国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網(wǎng)站 > 建站經驗 > 正文

iOS開發(fā)基礎:UI,TableView

2019-11-02 14:15:14
字體:
來源:轉載
供稿:網(wǎng)友

   實現(xiàn)UITableView的Controller需要實現(xiàn) < UITableViewDataSource, UITableViewDelegate > 這兩個代理,具體

放放電影網(wǎng)[www.aikan.tv/special/fangfangdianyingwang/]
就是要實現(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

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 云林县| 元阳县| 富阳市| 康保县| 波密县| 灵璧县| 勃利县| 泸定县| 铜梁县| 定边县| 新和县| 黄梅县| 东至县| 社会| 英山县| 通河县| 沾益县| 周口市| 达尔| 射阳县| 绿春县| 中阳县| 仁化县| 连山| 江源县| 岳阳县| 合江县| 陵川县| 福清市| 安远县| 贵州省| 昌吉市| 镇赉县| 卢龙县| 隆子县| 浦县| 科技| 星座| 浑源县| 定南县| 平顶山市|