9999热视频三级毛片AV区|日韩欧美精品狼友观看视频|av在线成人免费AA片|日韩三级AV电影|久久亚洲私人国产精品vA|亚洲无码卡一卡二卡三|手机在线免费看黄色片|婷婷尹人在线婷婷五月手机网|99爱在线播放|欧美成人色情视频品

iOS開發(fā)基礎:UITableView
來源:易賢網 閱讀:1325 次 日期:2014-11-04 09:09:31
溫馨提示:易賢網小編為您整理了“iOS開發(fā)基礎:UITableView”,方便廣大網友查閱!

實現(xiàn)UITableView的Controller需要實現(xiàn) < UITableViewDataSource, UITableViewDelegate > 這兩個代理,具體就是要實現(xiàn)以下兩個方法:

- (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的每一個Cell

更多信息請查看IT技術專欄

更多信息請查看技術文章
易賢網手機網站地址:iOS開發(fā)基礎:UITableView
關于我們 | 聯(lián)系我們 | 人才招聘 | 網站聲明 | 網站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點

版權所有:易賢網