Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 如何知道单元格的图像视图中是否有图像_Iphone_Objective C_Ios_Ipad_Uitableview - Fatal编程技术网

Iphone 如何知道单元格的图像视图中是否有图像

Iphone 如何知道单元格的图像视图中是否有图像,iphone,objective-c,ios,ipad,uitableview,Iphone,Objective C,Ios,Ipad,Uitableview,我有一个包含单元格的表视图。。。有些有图像,有些没有。我想对有图像的单元格进行大小调整,使其比没有图像的单元格大 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 150; } 有了这段代码,我如何判断indexPath是否有图像?谢谢你的帮助 使用与在tableView:cellforrowatinexpath:中使用的相同

我有一个包含单元格的表视图。。。有些有图像,有些没有。我想对有图像的单元格进行大小调整,使其比没有图像的单元格大

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{

    return 150;

}

有了这段代码,我如何判断indexPath是否有图像?谢谢你的帮助

使用与在
tableView:cellforrowatinexpath:
中使用的相同逻辑来获取支持
UITableViewCell
的模型信息

现在您有了填充
UITableViewCell
的信息,您可以查询是否提供了图像