PDA

View Full Version : UINavigationController - Skip over a view when creating a new item?




jaycyn94
Mar 13, 2009, 10:41 AM
I have an UINavigationController application where the navigation works like:



Main list -> view individual items -> edit parts of item



What I would like to do is be able to when I create a new item go directly to the edit page, then be able to navigate back out normally. I tried to set up my individual item controller to check in viewWillAppear that if this is a new item, pop over to the edit page. However when I do that, it seems to confuse the navigation controller, as it thinks it is on a different level of navigation.



It there a good way to jump a level or otherwise push two views across?



dejo
Mar 13, 2009, 11:40 AM
I tried to set up my individual item controller to check in viewWillAppear that if this is a new item, pop over to the edit page. However when I do that, it seems to confuse the navigation controller, as it thinks it is on a different level of navigation.
Try viewDidAppear instead. viewWillAppear is triggered before the new view has appeared, Hence the "will" part.