【发布时间】:2013-03-01 00:03:47
【问题描述】:
我想在同一个 xib 中使用自定义 UITableviewCell 和 UITableView 而不创建 UITableViewCell 类?
如下所示,我为 UITableViewCell 设置了标识符并像这样使用它:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"CustomIdentifier";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
}
但不工作?
【问题讨论】:
标签: ios uitableview