dealing with 2 storyboard with navigationcontroller and tabbar controller
up vote
0
down vote
favorite
I'm building a new iOS app with 2 storyboards.
the first one to authenticate the user, and the second for the app itself.
I'm using storyboard reference to switch between them.
And I am using the window object in app delegate to figure out which viewController or storyboard is shown.
Now the problem is with the window object.
To simplify the problem -
signin view controller in storyboard1 - app launches
screen showen - signinviewcontroller
appdelegate -> window -> uinavigationcontroller(rootviewcontroller) -> signinviewcontroller (topViewController & visibleViewController of navigation controller)
that's fine
user signin - tabbar controller in storyboard 2
screen showen - profileviewcontroller (tabbar viewcontroller)
appdelegate -> window -> uinavigationcontroller(rootviewcontroller) -> tab bar(visibleviewcontroller) -> profileviewcontroller(tabbar visibleViewController)
appdelegate -> window -> uinavigationcontroller(rootviewcontroller) -> signinviewcontroller(top viewcontroller)
why signinviewcontroller is the topview controller?
why the TabBarController is not the rootview controller of window object?
comeback to storyboard 1 to signin viewcontroller
screen shown - signinviewcontroller
appDelegate -> window -> uinavigationcontroller(rootviewcontroller) -> tab bar(visibleviewcontroller) -> profileviewcontroller(tabbar visibleViewController)
appdelegate -> window -> uinavigationcontroller(rootviewcontroller) -> signinviewcontroller(top viewcontroller)
why the TabBarController is the visibleviewcontroller even tho the signin viewcontroller from storyboard 1 is showen?
important to mention that the storyboard reference segue connected to the parent controller of the viewControllers
which means the storyboard reference from storyboard 1 to 2 i connected to navigationController itself - and in viewController -
self.navigationController?.performSegue(withIdentifier: "AuthToChatSegue", sender: nil)
and from storyboard 2 to 1 -
tabBarController?.performSegue(withIdentifier: "ChatToAuth", sender: nil)
ios xcode uinavigationcontroller storyboard uitabbarcontroller
add a comment |
up vote
0
down vote
favorite
I'm building a new iOS app with 2 storyboards.
the first one to authenticate the user, and the second for the app itself.
I'm using storyboard reference to switch between them.
And I am using the window object in app delegate to figure out which viewController or storyboard is shown.
Now the problem is with the window object.
To simplify the problem -
signin view controller in storyboard1 - app launches
screen showen - signinviewcontroller
appdelegate -> window -> uinavigationcontroller(rootviewcontroller) -> signinviewcontroller (topViewController & visibleViewController of navigation controller)
that's fine
user signin - tabbar controller in storyboard 2
screen showen - profileviewcontroller (tabbar viewcontroller)
appdelegate -> window -> uinavigationcontroller(rootviewcontroller) -> tab bar(visibleviewcontroller) -> profileviewcontroller(tabbar visibleViewController)
appdelegate -> window -> uinavigationcontroller(rootviewcontroller) -> signinviewcontroller(top viewcontroller)
why signinviewcontroller is the topview controller?
why the TabBarController is not the rootview controller of window object?
comeback to storyboard 1 to signin viewcontroller
screen shown - signinviewcontroller
appDelegate -> window -> uinavigationcontroller(rootviewcontroller) -> tab bar(visibleviewcontroller) -> profileviewcontroller(tabbar visibleViewController)
appdelegate -> window -> uinavigationcontroller(rootviewcontroller) -> signinviewcontroller(top viewcontroller)
why the TabBarController is the visibleviewcontroller even tho the signin viewcontroller from storyboard 1 is showen?
important to mention that the storyboard reference segue connected to the parent controller of the viewControllers
which means the storyboard reference from storyboard 1 to 2 i connected to navigationController itself - and in viewController -
self.navigationController?.performSegue(withIdentifier: "AuthToChatSegue", sender: nil)
and from storyboard 2 to 1 -
tabBarController?.performSegue(withIdentifier: "ChatToAuth", sender: nil)
ios xcode uinavigationcontroller storyboard uitabbarcontroller
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm building a new iOS app with 2 storyboards.
the first one to authenticate the user, and the second for the app itself.
I'm using storyboard reference to switch between them.
And I am using the window object in app delegate to figure out which viewController or storyboard is shown.
Now the problem is with the window object.
To simplify the problem -
signin view controller in storyboard1 - app launches
screen showen - signinviewcontroller
appdelegate -> window -> uinavigationcontroller(rootviewcontroller) -> signinviewcontroller (topViewController & visibleViewController of navigation controller)
that's fine
user signin - tabbar controller in storyboard 2
screen showen - profileviewcontroller (tabbar viewcontroller)
appdelegate -> window -> uinavigationcontroller(rootviewcontroller) -> tab bar(visibleviewcontroller) -> profileviewcontroller(tabbar visibleViewController)
appdelegate -> window -> uinavigationcontroller(rootviewcontroller) -> signinviewcontroller(top viewcontroller)
why signinviewcontroller is the topview controller?
why the TabBarController is not the rootview controller of window object?
comeback to storyboard 1 to signin viewcontroller
screen shown - signinviewcontroller
appDelegate -> window -> uinavigationcontroller(rootviewcontroller) -> tab bar(visibleviewcontroller) -> profileviewcontroller(tabbar visibleViewController)
appdelegate -> window -> uinavigationcontroller(rootviewcontroller) -> signinviewcontroller(top viewcontroller)
why the TabBarController is the visibleviewcontroller even tho the signin viewcontroller from storyboard 1 is showen?
important to mention that the storyboard reference segue connected to the parent controller of the viewControllers
which means the storyboard reference from storyboard 1 to 2 i connected to navigationController itself - and in viewController -
self.navigationController?.performSegue(withIdentifier: "AuthToChatSegue", sender: nil)
and from storyboard 2 to 1 -
tabBarController?.performSegue(withIdentifier: "ChatToAuth", sender: nil)
ios xcode uinavigationcontroller storyboard uitabbarcontroller
I'm building a new iOS app with 2 storyboards.
the first one to authenticate the user, and the second for the app itself.
I'm using storyboard reference to switch between them.
And I am using the window object in app delegate to figure out which viewController or storyboard is shown.
Now the problem is with the window object.
To simplify the problem -
signin view controller in storyboard1 - app launches
screen showen - signinviewcontroller
appdelegate -> window -> uinavigationcontroller(rootviewcontroller) -> signinviewcontroller (topViewController & visibleViewController of navigation controller)
that's fine
user signin - tabbar controller in storyboard 2
screen showen - profileviewcontroller (tabbar viewcontroller)
appdelegate -> window -> uinavigationcontroller(rootviewcontroller) -> tab bar(visibleviewcontroller) -> profileviewcontroller(tabbar visibleViewController)
appdelegate -> window -> uinavigationcontroller(rootviewcontroller) -> signinviewcontroller(top viewcontroller)
why signinviewcontroller is the topview controller?
why the TabBarController is not the rootview controller of window object?
comeback to storyboard 1 to signin viewcontroller
screen shown - signinviewcontroller
appDelegate -> window -> uinavigationcontroller(rootviewcontroller) -> tab bar(visibleviewcontroller) -> profileviewcontroller(tabbar visibleViewController)
appdelegate -> window -> uinavigationcontroller(rootviewcontroller) -> signinviewcontroller(top viewcontroller)
why the TabBarController is the visibleviewcontroller even tho the signin viewcontroller from storyboard 1 is showen?
important to mention that the storyboard reference segue connected to the parent controller of the viewControllers
which means the storyboard reference from storyboard 1 to 2 i connected to navigationController itself - and in viewController -
self.navigationController?.performSegue(withIdentifier: "AuthToChatSegue", sender: nil)
and from storyboard 2 to 1 -
tabBarController?.performSegue(withIdentifier: "ChatToAuth", sender: nil)
ios xcode uinavigationcontroller storyboard uitabbarcontroller
ios xcode uinavigationcontroller storyboard uitabbarcontroller
edited Nov 22 at 12:43
Sushil Sharma
1,53821537
1,53821537
asked Nov 22 at 11:00
Ido Talmor
11
11
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53429477%2fdealing-with-2-storyboard-with-navigationcontroller-and-tabbar-controller%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown