dealing with 2 storyboard with navigationcontroller and tabbar controller
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 |
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 |
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 '18 at 12:43
Sushil Sharma
1,58721538
1,58721538
asked Nov 22 '18 at 11:00
Ido TalmorIdo Talmor
11
11
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
0
active
oldest
votes
0
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.
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