MapMapM 2013-01-25 02:47 采纳率: 0%
浏览 1863

如何在UIlabel显示核心数据

我在UITableView中正确的获取了核心数据,但是在UILabel失败了。

(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
{
  static NSString *CellId = @"Cell";

  Cell *cell=[table dequeueReusableCellWithIdentifier:CellId];
  if (cell==nil) {
      [[NSBundle mainBundle]loadNibNamed:@"Cell" owner:self options:nil];
      cell=self.custom;
  }
  // Get the event corresponding to the current index path and configure the table view cell.
  Student *stu = (Student *)[dataarr objectAtIndex:indexPath.row];
  cell.item.text = [stu name];
  cell.rate.text = [stu rate];
  currentindex=indexPath.row;
  return cell;
}
  • 写回答

1条回答 默认 最新

  • 睡觉不盖被 2015-08-24 15:39
    关注

    没听懂楼主的意思 你得代码中没有出现UILable,在cell == nil 分支中 楼主 初始化cell 值的部分 是不是存在错误

    评论

报告相同问题?

悬赏问题

  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 Web.config连不上数据库
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
  • ¥15 怎么配置广告联盟瀑布流
  • ¥15 Rstudio 保存代码闪退
  • ¥20 win系统的PYQT程序生成的数据如何放入云服务器阿里云window版?
  • ¥50 invest生境质量模块
  • ¥15 nhanes加权logistic回归,svyglm函数