Reputation: 8066
I used the code below to get an invisible UITableViewCell
NSIndexPath* path = [NSIndexPath indexPathForRow:row inSection:0];
UITableViewCell *cell = [listTableview cellForRowAtIndexPath:path];
path returns something, but cell returns nil.
It looks like the code above only can get the visible UITableViewCell.
Your comment welcome
Upvotes: 0
Views: 149
Reputation: 11242
The docs clearly say it needs to be visible.
An object representing a cell of the table, or nil if the cell is not visible or indexPath is out of range.
Also, you are initializing the index just like how you would intialize any other variable, which has nothing to do with it having to be a valid indexPath.
Upvotes: 1