亚洲免费乱码视频,日韩 欧美 国产 动漫 一区,97在线观看免费视频播国产,中文字幕亚洲图片

      1. <legend id="ppnor"></legend>

      2. 
        
        <sup id="ppnor"><input id="ppnor"></input></sup>
        <s id="ppnor"></s>

        iOS開發(fā)基礎(chǔ):UITableView

        字號(hào):


            實(shí)現(xiàn)UITableView的Controller需要實(shí)現(xiàn) < UITableViewDataSource, UITableViewDelegate > 這兩個(gè)代理,具體就是要實(shí)現(xiàn)以下兩個(gè)方法:
            - (NSInteger)tableView:(UITableView *)tableView
            numberOfRowsInSection:(NSInteger)section{
            return [model getRowCount];
            }
            //返回UITableView的行數(shù)
            - (UITableViewCell *)tableView:(UITableView *)tableView
            cellForRowAtIndexPath:(NSIndexPath *)indexPath
            {
            static NSString *CellIdentifier = @”Cell”;
            UITableViewCell *cell = [tableView
            dequeueReusableCellWithIdentifier:CellIdentifier];
            if (cell == nil) {
            cell = [[[UITableViewCell alloc]
            initWithFrame:CGRectZero
            reuseIdentifier:CellIdentifier] autorelease];
            }
            NSUInteger row = [indexPath row];
            cell.textLabel.text = [model getNameAtIndex:row];
            return cell;
            }
            //呈現(xiàn)UITableView的每一個(gè)Cell