I just finished designing a application that uses a top bar that toggles between three UIViewControllers. My first thought was to use a UITabBarController, since it works very simular.
However, the tabBar is at the bottom and in my PSD, it's at the top. Is there anyway I can change it? I see in the library I can drag in a UITabBar, but I don't know how to get it to change pages from there.
Please help! Coulton
Hope the below code helps
Worked fine for me
I think it can be done, but you should be aware of this:
So, in your UI (I suppose you defined it in Interface Builder), instantiate a
UITabBar
object (by choosing it in the IB library and dragging it to your view in IB). Choose the default position and also define the way that this tab bar autoresizes (using the size pane of the info window). Then, add an outlet to your view controller of type UITabBar, and, finally, connect the tab bar object to the tab bar outlet.Once you have done this, in your view controller's
viewDidLoad
method you can customize any property of the tab bar that you want to.