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)


storybopard 1



storyboard 2










share|improve this question




























    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)


    storybopard 1



    storyboard 2










    share|improve this question


























      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)


      storybopard 1



      storyboard 2










      share|improve this question















      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)


      storybopard 1



      storyboard 2







      ios xcode uinavigationcontroller storyboard uitabbarcontroller






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 22 at 12:43









      Sushil Sharma

      1,53821537




      1,53821537










      asked Nov 22 at 11:00









      Ido Talmor

      11




      11





























          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',
          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
          });


          }
          });














          draft saved

          draft discarded


















          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






























          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Trompette piccolo

          Slow SSRS Report in dynamic grouping and multiple parameters

          Simon Yates (cyclisme)