Assigning IBAction to the Back Button of the Navigation Bar (iPhone SDK)
In this post ( Flip View Iphone) i created a flip view for my iPhone app. Now, I want to make sure that whenever the user clicks the back button on the navigation bar, the next time they drill down to the cut view, that view is in its original, non-flip position. Currently the app is actually loading the correct view, but somehow when you try to flip it it fails to load the flip view and only presents a black background. One solution could be to assign a backward method ("showLessInfo") to the navigation button, and for that I need your help. Alternatively, and probably a better idea for me, it would be to understand why the flip view is not loading a second time. Any suggestion is appreciated!
You can override the method viewWillAppear:
on your flip show view controller and make sure behind the scenes it loads the correct view before showing (remember to call [super viewWillAppear:animated]
).
Or else you can override viewWillDisappear
and make sure everything is cleaned up in the output. It will be called when the user removes the back button.
a source to share