【发布时间】:2015-11-22 21:31:04
【问题描述】:
我正在尝试此代码并收到以下警告
从“UITableViewCell”分配给“GuideTableViewCell”的指针类型不兼容
排队
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"BusinessTableViewCell"];
完整代码:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
BusinessTableViewCell * cell = [self.tableView dequeueReusableCellWithIdentifier:@"BusinessTableViewCell"];
if (!cell) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"BusinessTableViewCell"];
}
BusinessInfo * business = self.businesses[indexPath.row];
cell.business = business;
return cell;
}
也试过了
BusinessTableViewCell *cell = [[UITableViewCell alloc]initWithStyle: UITableViewCellStyleDefault reuseIdentifier:@"BusinessTableViewCell"];
仍然出现错误,任何人都可以给我一些帮助。
谢谢
【问题讨论】:
标签: ios objective-c uitableview