What I want is to create iPhone application.
Everything will be static data. What I want is show menu (as Menu 1, Menu 2, ...) one by one at the down side. Once I click on Menu 1, I will display details of Menu 1 on next screen.
Right now what I have done is created home page. There I have button saying Menu. Once I click on that button, I am going to another screen which is TableViewController. Any idea how to show menu buttons there?
Any idea or suggestion would be greatful.
Thanks in advance to all...
It seems that you are looking for UITabBarController, check the reference.
If you don't want use the UITabBarController you could insert your "home page" controller into a UINavigationController and push your viewcontrollers with some IBAction associated to your buttons, or otherwise display your controllers in modal way.
Related
I have the following in my storyboard and would like to add a button at the top of the TableView that allows me to add Members.
The scenario, a user is presented with the first screen which displays 'User Profile' and 'Members'. When 'Members' is touched the next screen is displayed that shows a list of Members and at the top is a button that says '< Settings' whcih allows the user to go back one screen.
I am trying to display a 'Add' button at the top when the list of Members is displayed.
Hope that makes sense!! I was hoping to not have to Embed the TableView in another Nav Controller.
Thanks for any help!!!!
You can add a button into the navigation bar, but first, you need to have a navigation bar.
To do this, you need to select your scene in the Storyboard and then go to the the Editor menu and select Embed In:Navigation Controller.
Once this is done, you can drag in a Navigation Item from the panel on the right.
Then you can add that to your class as an IBOutlet and declare an IBAction for it.
Cool?
Also, I think that your storyboard file might not be set up right.
Check out Apple's Simple Drill Down sample file available here:
http://developer.apple.com/library/ios/samplecode/SimpleDrillDown/Introduction/Intro.html
Cheers.
I found some iOS sliding menu controllers (like Path 2.0 , Facebook iOS), such as ViewDeck https://github.com/Inferis/ViewDeck, ECSlidingViewController https://github.com/edgecase/ECSlidingViewController. But they does not work like UITabbar Controler.
I want to make left side menu controller work like UITabbar, and it can kepp state for each controller for every mene item. It should not create a new controller when I tap a menu item. When I tap a menu item to display a controller (as "controller a") and scroll to someplace, then I switch to another menu item, and switch back to "controller a", it should show me 'controller a' display without changed, just like a tap a UITabbar item.
Thank you.
The below link might help you :
https://github.com/stefanoa/SASlideMenu
I use ViewDeck, but I do not have the problem you mentioned. The menu calls the main view to perform a transition, not to instantiate a new view. Therefore, I can implement a back option on the menu to return to the original view in the same state as it was left.
Here is my implementation. It's a subclass of a UINavigationController, and very easy to use.
https://github.com/aryaxt/iOS-Slide-Menu
I have an application with a maybe-strange navigation scenario. I'll try to explain:
1) first scene: select an available item from a list
1.1) once selected, you navigate to a tab view allowing you to view/edit the various attributes
2) if the desired item isn't available, you may create a new one (by selecting a "+" bar button) which navigates to an alternate scene
2.1) there may be multiple scenes required to create the item, all scenes are simply pushed on the stack to allow the user to go back, select different options, etc.
2.2) once all scenes have been displayed and all attributes have been collected, the new "item" will be created and saved.
2.3) now, I want to automatically act as though the user selected this item from the beginning, that is, I want to pop all previous views off the stack and navigate directly into the tabs (step 1.1).
Does this make sense? Easy to do? Is there a better way to go about this? I'm using xCode 4.2 with storyboards.
Any guidance would be appreciated.
If you want (+) button on TabBar you should subclass UITabBar: Fo ex. TabBarPlus and set this class in storyboard.
But easier place (+) button on navigation bar.
The max number of displaying tabsart is 5 for iphone and 8 for ipad. If the there > number of tabs the last is "More" tab thet displaing list of other tubs in tableview. I you want displaying more tabs on tabbar then you should subclass UITabBar :)
If you want by back button on naigation bar switching beetwing Views that references with TabBar buttons you must create stack in code and hide backbutton of navigationbar and use castom left button of navigationbar.
The other navigation can be easy done in storyboard
I have a navigation bar in my app. The below pictures are in the order of navigation.
Problem I have is, on clicking the "Main" button , I am able to perform the action and goto the required screen , but the navigation bar does not look like the first on (with Menu as left button). Instead it look like 4th image. How to make it look like first image so that I can make the user to navigate to "Menu" screen by clicking menu button ?. Thanks for the help …!!!
If I'm understanding this correctly, you may have pushed the first view controller (The one from screenshot 1) when clicking on main which is why you see "lens" in the back button. That back button takes the title of the previous view controller in the stack. What you want to do is pop to the first view controller when they click on Main using either popToRootViewController or popToViewController:animated
I am developing a application in which I need to provide navigate to backward screen programmatically, in which there are two scenarios:
There will one MainWindow.xib and few buttons on it, click of any one button will load another appropriate screen. On this screen, I need to put back button, click of which will load MainWindow.xib again and user can choose some other option.
Except the above scenario, also all the screens will contain back button, click of which will load the previous again and user can choose some other option.
Regards,
Pratik
You want to use the UINavigationController for this. See the link for the documentation and example projects. I can't really give a full example here, but you can get started with the "Navigation-Based Application" template in XCode.
The general idea is that you push and pop views to/from a UINavigationController, and it will handle the back button and navigation toolbar for you. It's pretty straight forward.