在我的
tableView
,我有5个tableView
cells
。每个都有一个imageView
。 在tableView
之外,有一个UIButton
。UIButton
上面也有图像。 现在,我的问题是检查cells
上的图像是否被隐藏。 清除问题,我需要检查所有单元格,如果 所有cells
上的imageView
是否隐藏。我试过这段代码:
for (int i=0; i<=4; i++)
{
if (cell.unlockImageView.hidden)
{
NSLog(@"calling if for hiding image");
}
}
我认为我的代码不正确,但我试了一下,但没有 工作。所以请建议我如何检查该图像在所有单元格上查看 是不是隐藏的?
尝试下面的代码,希望它能帮助你。
for (customTableViewCell* tblCell in tableView.visibleCells)
{
if (tblCell.unlockImageView.hidden)
{
NSLog(@"Imageview is hidden");
}
}