
- (UItableVIEwCell *)tableVIEw:(UItableVIEw *)tableVIEw cellForRowAtIndexPath:(NSIndexPath *)indexPath{ static Nsstring *CellClassname = @"DemotableVIEwCell_sched"; DemotableVIEwCell_sched *cell = [tableVIEw dequeueReusableCellWithIDentifIEr:CellClassname]; if (cell == nil) { NSArray *topLevelitems = [cellLoader instantiateWithOwner:self options:nil]; cell = [topLevelitems objectAtIndex:0]; } cell.fooData = [self.BUGs objectAtIndex:indexPath.row]; return cell;}@H_502_12@ 然后我在VIEwDIDLoad中
cellLoader = [UINib nibWithNibname:@"DemotableVIEwCell_sched" bundle:[NSBundle mainBundle]];@H_502_12@解决方法 就我而言,发生的事情是我没有保持对tablevIEw的dataSource的强大指针.因此,当滚动tablevIEw时,数据源已经被释放并设置为nil,这导致tablevIEw的numRowsForSection为0,而cellForRowAtIndexPath为nils. 如果有人遇到类似问题,您可能会查看是否正确保留了数据源和/或自定义对象.
总结 以上是内存溢出为你收集整理的iphone – UITableView自定义单元格滚动后消失的内容全部内容,希望文章能够帮你解决iphone – UITableView自定义单元格滚动后消失的内容所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)