How can I start my Iphone App (Tabbarcontroller) always o开发者_如何学运维n the same Viewcontroller?
By default the first view controller will always be the default (and view controllers will appear on the tab bar in the order added, etc.)
However, you can select a different view controller via the selectedViewController
property of the UITabBarController class. (You can also use the selectedIndex
property to select a view controller by index numerically.)
UPDATE
Incidentally, if you want to force the application to quit (rather than allow it to go into the background) add the "Application does not run in background" option to your application's plist file and set it to true. That said, the current behaviour is correct.
精彩评论