Reputation: 604
i have a tab bar application, now what i want to do is to change the views of a same tab bar item programmatically, means my requirement is that when application is running for the first time after installation (i will use NSUserDefaults for the "first time" thing) the first item of tab bar will contain the nib or view of Sign up class, that is at first run the sign up page or view will show on first item of tab bar, and then after that at every run the sign in screen will show at the same first item, now i am confused how to do it programmatically, coz i always set the nibs inside tab bar for each item using interface builder, now here it is different situation, plz. guide me in this how to go about that task, thanx and regards. Saad.
Upvotes: 1
Views: 455
Reputation: 31026
UITabBarController has a method called setViewControllers:animated:
that lets you provide an array of view controllers to be displayed. If you detect it's not "first time" you can rearrange your list of controllers.
Upvotes: 1