I have a UITableView and some UITableViewCells which i have created manually via the Interface Builder. I’ve assigned each cell an outlet, and im connecting them to the UITableView in the CellForRowAtIndexPath method. In this method, I use the switch(case) method to make specific cells appear in the UITableView, depends on the case.
Now, I want to find a specific cell and check if he is exists within the UITableView. I use the method: UITableView.visibleCells to get an array of the cells in the table view. My question is – how can i check if a specific cells exists in the array? can I use the outlet that i’ve assigned to it somehow? – (The best solution),OR, can I use an identifier and how?
Thanks 🙂
Note that you can as well use
indexPathsForVisibleRowsthis way:If you have the indexPath (and don’t need the actual Cell) it might be cheaper.
PS:
_peopleis theNSArrayused as my backend in this case.