iphone - When is UITableView finished updating? -


My problem seems quite simple, but I failed to find a solution here or elsewhere. I have UITableView as a subclass in one of my UIViews, when the application ends, the last selected table cell is saved to NSUserDefaults and when the application restarts So I want to set the seal cell as it was before, however, whenever I do it very quickly, problems arise, because the number of classes is unknown, that is, the table has not yet loaded its figure. Land. So I decided to set it in the function numberOfRowsInSection , which works, but I'm sure it is not the right place to do this.

  - (NSInteger) tableView: (UITableView *) table view numberoffirez innassion: (NSInteger) section {int iNofRows = 0; // Default // This is not good here but .... If (bSetDefaultSelection == Yes) {bSetDefaultSelection = NO; // Stop Recursion ** NSIndexPath * indexPath = [NSIndexPath IndexPathForRow: (NSUInteger) L Last_Cell_O In these designs: (NSUntiger) 0]; [Self Selection Row IndexPath: IndexPath Animated: No Scrollpottion: UITableViewScrollPositionMiddle]; **} return iNofRows; }  

I think the place you are looking for

< Pre> - (zero) viewDeadapp: (BOOL) animated; // On the screen when the scene is completely infected, the default is called

(For more information see UIViewController) I have just debug my app and That method is called after one of your mentioned:

  - (NSInteger) table view: (UITableView *) table view numberofrose injection: (NSInteger) section  

In your case you have to type something like this:

  - (zero) viewDidApper: (BOOL) animated {NSIndexPath * indexPath = [NSIndexPath IndexPathForRow: (NSUInteger) l Last_Cell_O These designs: (NSUIENTER) 0]; [Self Selection Row IndexPath: IndexPath Animated: No Scrollposition: UITWeekScrollPoMillied]; }  

Cheers!


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -