国产探花免费观看_亚洲丰满少妇自慰呻吟_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ā)表
主站蜘蛛池模板: 二连浩特市| 衡阳县| 扎兰屯市| 仪陇县| 布拖县| 涟源市| 锡林浩特市| 任丘市| 涞源县| 鸡东县| 米林县| 河北区| 尉犁县| 通州区| 治多县| 桑日县| 柞水县| 阳信县| 宣城市| 潜山县| 迁安市| 电白县| 通化县| 广河县| 抚宁县| 叶城县| 无锡市| 碌曲县| 太保市| 中超| 铁力市| 长岛县| 义马市| 祁阳县| 新郑市| 灵丘县| 盐城市| 乐业县| 富蕴县| 五大连池市| 涞源县|