Objective c 对tableViewCells应用检查以隐藏imageView

Objective c 对tableViewCells应用检查以隐藏imageView,objective-c,uitableview,uiimageview,uibutton,xcode6.0.1,Objective C,Uitableview,Uiimageview,Uibutton,Xcode6.0.1,在我的表格视图中,我有5个表格视图单元格。每个都有一个imageView。 在tableView之外,有一个ui按钮ui按钮上也有图像。 现在,我的问题是检查单元格上的图像是否隐藏。 清除问题,我需要检查所有单元格,如果 所有单元格上的imageView是否隐藏。我尝试了以下代码: for(inti=0;i尝试下面的代码,希望它能帮助您 for (customTableViewCell* tblCell in tableView.visibleCells) { if (t

在我的
表格视图
中,我有5个
表格视图
单元格
。每个都有一个
imageView
。 在
tableView
之外,有一个
ui按钮
ui按钮
上也有图像。 现在,我的问题是检查
单元格
上的图像是否隐藏。 清除问题,我需要检查所有单元格,如果 所有
单元格上的
imageView
是否隐藏。我尝试了以下代码:


for(inti=0;i尝试下面的代码,希望它能帮助您

for (customTableViewCell* tblCell in tableView.visibleCells)
    {
        if (tblCell.unlockImageView.hidden)
        {
            NSLog(@"Imageview is hidden");
        }
    }

谢谢,但它不起作用。ImageView在所有单元格上都是隐藏的,但它没有在日志中打印“ImageView是隐藏的”。如果在If条件之前使用NSLog(@“%@”,tblCell.unlockImageView),那么您将在日志中获得所有信息这是我在应用程序中尝试的代码,
(SayMoreTableViewCell*tblCell in tableView.visibleCells){NSLog(@“Imageview是隐藏的%@”,tblCell.ulockImageView);if(tblCell.ulockImageView.hidden){}
它也没有调用循环。你在NSLog()中得到了什么?它像0x797a7050一样打印;frame=(0;320 519);hidden=YES;autoresize=W+H;layer=>
for (customTableViewCell* tblCell in tableView.visibleCells)
    {
        if (tblCell.unlockImageView.hidden)
        {
            NSLog(@"Imageview is hidden");
        }
    }