The tab tab should not be enabled without the user clicking on any tab, below I write the code to display I'm on the bar, but by default this problem is showing the first tab.
- (BOOL) Application: (UIApplication *) Application FinishLaunchingWithOptions: (NSDictionary *) launchOptions {self.window = [[UIWindow Alloc] initWithFrame: [[UIScreen main screen] border] ]; // Override Point for optimization after application launch. Self.window.backgroundColor = [UIColor whiteColor]; [Self. Windows and knowledgeable]; Logview Controller * PeopleViewControler = [[Log Viewer Alloc] init]; UINavigationController * nav1 = [[UINavigationController alloc] initWithRootViewController: peopleViewController]; [Logview Controller Settlement: @ "People"]; EventsViewController * Event Viewer Control = [[Event View Controller Alloc] init]; UINavigationController * nav2 = [[UINavigationController alloc] initWithRootViewController: eventsViewController]; [Events Controller Settings: @ "Events"]; ActiveViewController * activeViewController = [[ActiveViewController alloc] init]; UINavigationController * nav3 = [[UINavigationController alloc] initWithRootViewController: activeViewController]; [ActiveViewController setTitle: @ "active"]; More ViewController * More ViewController = [[MoreViewController alloc] init]; UINavigationController * nav4 = [[UINavigationController alloc] initWithRootViewController: moreViewController]; [More visualizer set titles: @ "more"]; NSArray * arrViewControllers = [[NSArray alloc] initWithObjects: nav1, nav2, nav3, nav4, zero]; [Tabbar controller setview controller: arrViewControllers]; [Self. Window Adsview: TabBr Controller See]; Yes come back }
Create an IBOutlet for tab bar (like theTabBar
) And use the following code:
[theTabBar set selected ITM: zero];
Comments
Post a Comment