Search code examples
iphonexcode4ios-4.2ios4

Display modally a Tabviewcontroller with 3 tabs when clicking a tool Bar button


I'm beginner in Iphone development. I have an app in which there is a tool bar ,when I click the tool Bar buttonI need to display modally a Tabviewcontroller with 3 tabs and navigation bar. Is it possible to do this? May be it is simple,but i'm a beginner. How it can done? Any help would be appreciable.


Solution

  • What is the issue that you are facing? Overall this is what you need to do:

    1. Create a UITabBarController with 3 items. (There are resources everywhere where you can figure how to do this)

    2. Handle what you do with the 3 views/tab items. Your navigation bar logic goes there. You set up the navigation bar for the 3 different views from the 3 tabs.

    3. Present it as a modal view using:

      [self presentModalViewController:yourTabBarController animated:YES];