【发布时间】:2015-03-19 12:39:18
【问题描述】:
我正在尝试使用 Parse 框架为 iPad 应用程序制作自定义表格视图单元格。当我在没有自定义单元格的情况下进行查询时,它可以正常工作,但是一旦我更改单元格标识符,我就会卡在加载图标上。
代码如下:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath object:(PFObject *)object {
static NSString *CellIdentifier = @"specielCelle";
sagerCelle *cell = (sagerCelle *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
if (cell == nil) {
cell = [[sagerCelle alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
// Configure the cell
cell.lblPolice.text = [object objectForKey:@"police"];
//cell.textLabel.text = [object objectForKey:self.textKey];
//cell.imageView.file = [object objectForKey:self.imageKey];
return cell;
}
【问题讨论】:
-
卡在加载对话框是什么意思?它会崩溃吗?您是否调试过卡住的地方?
-
您的问题不清楚。您是否在启动时向 UITableView 注册自定义类?
-
我已经导入了我的自定义单元格类 .h 文件,并命名了单元格标识符,将 .h 文件与自定义单元格相关联,我得到的只是一个旋转的加载图标,没有任何显示。如果我注释掉“自定义部分”,则加载查询,但没有自定义布局。
标签: ios objective-c uitableview parse-platform tableviewcell