I have a table with custom table cells, is there any way of knowing when they have been viewed, i开发者_开发问答.e. their contents have been completely shown to the user?
After stepping through Apple doc on TableViews. You can get view window's location and determine which cell has been displayed with a boolean (isDisplayed). Of interest: -contentInset -contentSize
*When specializing UITableCell, you can add the boolean there.
Hope this helps
UITableViewDelegate defines the method tableView:willDisplayCell:forRowAtIndexPath:
so you just need to override that method.
From the Apple docs at http://developer.apple.com/library/ios/#documentation/uikit/reference/UITableViewDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intf/UITableViewDelegate,
"Tells the delegate the table view is about to draw a cell for a particular row."
精彩评论