back button wont work.. Iphone
I have 2 page controls in my app, one for category and when i click details button of that category other page control comes. I h开发者_运维知识库ave pushed the first view controller and used present modal view controller. Now a need to go back to the home page from the category page control but the view did load and view will appear wont work. That is where i have added my navigation bar programmatically. is there any way i can call them?
i am new to iphone programming. Please help me if you can....
Thankyou
You can use delegate.
Set the object that created your new view controller as delegate. When you presenting your view controller add it to navigation bar. Setup your view controller with cancel/done buttons and set them up to pass the messages to delegate.
When user selects cancel/done the delegate method is called. Delegate can then dismiss the view controller.
See the example in View Controller programming guide for iPhone OS.
You'll have to setup the buttons and call to delegate when you create your view controller.
If you have used "present model view controller"
then you required to use "dismis model view controller" instead of using "pop view controller" for going back...
精彩评论