Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread Display Modes
Old Mar 16, 2012, 03:24 AM   #1
macrumors newbie
Join Date: Mar 2012
UITabBarController delegate with storyboard

Hi developer's, i need help please,
I know that if i have rootViewController that start with tabBar i can create UITabBar like this:
UITabBarController *tabController = (UITabBarController *)self.window.rootViewController; 
tabController.selectedIndex = [defaults integerForKey:kOptionLastTabSelectedKey]; 
tabController.delegate = self;
But my problems is:
First, how can i create tabBar if the tabBar is not my rootView? my app start with login that is simple viewController, and after login the tabBar will appear.
Second, where should i create the tab bar, in appDelegate or some else?

lsegev is offline   0 Reply With Quote
Old Mar 16, 2012, 09:46 AM   #2
dejo's Avatar
Join Date: Sep 2004
Location: The Centennial State
According to Apple:
When deploying a tab bar interface, you must install this view as the root of your window. Unlike other view controllers, a tab bar interface should never be installed as a child of another view controller.
So, how to do a login view that appears before the tab view? I've had success by making the tab view the root view and then presenting the login view modally.
My iOS Apps: a.k.a., DreamStream, Flag Holidays
I support the MacRumors Blood Drive!
dejo is offline   1 Reply With Quote

MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Storyboard error hassoon iPhone/iPad Programming 0 Mar 15, 2013 06:19 PM
Resolved: UITabBarController show only 1 tab igorladessa iPhone/iPad Programming 1 Dec 19, 2012 06:52 AM
Storyboard problem ildandi iPhone/iPad Programming 9 Nov 12, 2012 01:59 PM
Storyboard and languages ildandi iPhone/iPad Programming 0 Nov 11, 2012 08:24 AM
Storyboard Question RagingGoat iPhone/iPad Programming 1 Sep 28, 2012 11:07 AM

Forum Jump

All times are GMT -5. The time now is 02:09 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2015, MacRumors.com, LLC