You need to be careful where you put that scrollToRowAtIndexPath call. If you put it before the view loads, it may be running that method on nil. I would say have a function in myViewController called scrollToRowAtIndexPath: which determines if the view is currently displayed, and if it is, just calls the tableView version.
If not, save the indexPath until viewWillAppear: is called and run it then.
Ed, Thanks for your reply. I was able to get the tableview to scroll to its position when the tableview has been loaded with data at least once. However, im a little stumped on the second part.
If the tableview had never been loaded I defer the scroll to position until a later time, in this case viewWillAppear. It seems that in viewWillAppear and viewDidAppear the table has not been loaded yet so it could not scroll to the positon. Is there an event that fires when the table view is finished asking for data?
Thanks, – Chris1Shop Oct 5 '09 at 18:40 In response to my own comment, I had noticed that on viewWillAppear, the tableview was not loaded and could scroll to position. Howver, in that method, if I call reloadData on the table, the tableview will scroll to the correct index. Im not convinced that this is the proper way to achieve my goal.
But it worked. – Chris1Shop Oct 28 '09 at 20:14.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.