PDA

View Full Version : UINavigationController to show a back button when switching a view using animation




tonydleopard
Nov 30, 2008, 09:06 AM
Hi,

I have created a Window Based Application using pure coding. The application has a NavigationController and Tab Bar controller. Also in the application delegate am drawing a custom navigation list with quartz which has got a different look (Am doing this bcos i dont want to redraw the navigation whenever there is a change in the view). Now my problem is in the application main view i am loading a scroll view with some image views. When i click on any image i am loading a webview using animation. All this happens in the same view controller. My question How Can i change the navigation bar to show a back button when i change or replace a view inside the same view controller. Also how do i ensure that clicking on the back button shows the first view again.

Thanks in advance...
Tony



dipaliP
Dec 5, 2008, 05:38 AM
create a back button for navigation bar if you are going to create it through code otherwise you can just put a navigation bar button item onto navigation bar.
Then get object of that button and make it visible or invisible as per need. You can add an action for back button, in that action write code to replace one view by another view. This action will execute on back button touch up inside event. I hope this will help you.