Modal View Controller Undesirably Hides Tab Bar












1















I am working on an application that requires user authentication to access a profile. The profile section is located solely under one tab (and all others tabs do not require authentication). I currently present a authentication view controller modally (and then dismiss on success) when the user selects the profile tab. However, this approach prevents the user from deciding not to register / login (that is, all tabs are hidden once the authentication screen is presented modally). I don't want the user to be able to dismiss the modal view controller, but rather have it modal only for the profile tab. Is this possible? Can I have tabs visible while having a modal view controller? What is the best approach here. Thanks.










share|improve this question



























    1















    I am working on an application that requires user authentication to access a profile. The profile section is located solely under one tab (and all others tabs do not require authentication). I currently present a authentication view controller modally (and then dismiss on success) when the user selects the profile tab. However, this approach prevents the user from deciding not to register / login (that is, all tabs are hidden once the authentication screen is presented modally). I don't want the user to be able to dismiss the modal view controller, but rather have it modal only for the profile tab. Is this possible? Can I have tabs visible while having a modal view controller? What is the best approach here. Thanks.










    share|improve this question

























      1












      1








      1


      1






      I am working on an application that requires user authentication to access a profile. The profile section is located solely under one tab (and all others tabs do not require authentication). I currently present a authentication view controller modally (and then dismiss on success) when the user selects the profile tab. However, this approach prevents the user from deciding not to register / login (that is, all tabs are hidden once the authentication screen is presented modally). I don't want the user to be able to dismiss the modal view controller, but rather have it modal only for the profile tab. Is this possible? Can I have tabs visible while having a modal view controller? What is the best approach here. Thanks.










      share|improve this question














      I am working on an application that requires user authentication to access a profile. The profile section is located solely under one tab (and all others tabs do not require authentication). I currently present a authentication view controller modally (and then dismiss on success) when the user selects the profile tab. However, this approach prevents the user from deciding not to register / login (that is, all tabs are hidden once the authentication screen is presented modally). I don't want the user to be able to dismiss the modal view controller, but rather have it modal only for the profile tab. Is this possible? Can I have tabs visible while having a modal view controller? What is the best approach here. Thanks.







      iphone cocoa-touch






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 17 '10 at 17:14









      Kevin SylvestreKevin Sylvestre

      25.5k26122205




      25.5k26122205
























          2 Answers
          2






          active

          oldest

          votes


















          5














          The entire point of a modal dialog box or view controller is to force the user to look at or do whatever the modal view is requesting, and prevent them from doing something else with that application. It seems to me that the best approach, if you still want to use a modal view controller, would simply be to have a "Cancel" button or something on the view controller. Since the profile tab can only be accessed after authentication in the first place, just have dismissing the view controller make the last-viewed tab the active tab.






          share|improve this answer





















          • 1





            +1 The OP has a design problem because he doesn't actually want a model view. He just wants to block the operation within a single tab. Modal views are intended to block the entire interface.

            – TechZen
            Jun 17 '10 at 17:41






          • 1





            @TechZen: Indeed, and if I actually knew enough about UIKit I would have suggested something for that.

            – JAB
            Jun 17 '10 at 17:44













          • Yeah, I'm looking for a 'pseudo' modal view controller. Modal within the specific tabs view. No UIKit elements exist for this?

            – Kevin Sylvestre
            Jun 17 '10 at 18:04






          • 1





            The simplest solution is to disable the controls you don't want activated and reenable them when your done.

            – TechZen
            Jun 17 '10 at 18:36






          • 1





            Apple suggest to use a modal view to present an alternative orientation view (e.g. landscape). developer.apple.com/library/ios/#featuredarticles/… For this reason, I have the same problem as the OP. How to show a modal view while without obscuring the Tab Bar.

            – Snips
            Jan 14 '11 at 23:45





















          0














          Xcode 10:



          In the Attributes Inspector, inside View Controller section, you've the Presentation option.



          a) If you choose Over Current Context, the modal view just will appear over the view, but the Tab Bar will appear at the top of the view.



          b) Otherwise, if you choose Over Full Screen, the modal view will appears over all the UI, including tab bars.






          share|improve this answer

























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


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f3063916%2fmodal-view-controller-undesirably-hides-tab-bar%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            5














            The entire point of a modal dialog box or view controller is to force the user to look at or do whatever the modal view is requesting, and prevent them from doing something else with that application. It seems to me that the best approach, if you still want to use a modal view controller, would simply be to have a "Cancel" button or something on the view controller. Since the profile tab can only be accessed after authentication in the first place, just have dismissing the view controller make the last-viewed tab the active tab.






            share|improve this answer





















            • 1





              +1 The OP has a design problem because he doesn't actually want a model view. He just wants to block the operation within a single tab. Modal views are intended to block the entire interface.

              – TechZen
              Jun 17 '10 at 17:41






            • 1





              @TechZen: Indeed, and if I actually knew enough about UIKit I would have suggested something for that.

              – JAB
              Jun 17 '10 at 17:44













            • Yeah, I'm looking for a 'pseudo' modal view controller. Modal within the specific tabs view. No UIKit elements exist for this?

              – Kevin Sylvestre
              Jun 17 '10 at 18:04






            • 1





              The simplest solution is to disable the controls you don't want activated and reenable them when your done.

              – TechZen
              Jun 17 '10 at 18:36






            • 1





              Apple suggest to use a modal view to present an alternative orientation view (e.g. landscape). developer.apple.com/library/ios/#featuredarticles/… For this reason, I have the same problem as the OP. How to show a modal view while without obscuring the Tab Bar.

              – Snips
              Jan 14 '11 at 23:45


















            5














            The entire point of a modal dialog box or view controller is to force the user to look at or do whatever the modal view is requesting, and prevent them from doing something else with that application. It seems to me that the best approach, if you still want to use a modal view controller, would simply be to have a "Cancel" button or something on the view controller. Since the profile tab can only be accessed after authentication in the first place, just have dismissing the view controller make the last-viewed tab the active tab.






            share|improve this answer





















            • 1





              +1 The OP has a design problem because he doesn't actually want a model view. He just wants to block the operation within a single tab. Modal views are intended to block the entire interface.

              – TechZen
              Jun 17 '10 at 17:41






            • 1





              @TechZen: Indeed, and if I actually knew enough about UIKit I would have suggested something for that.

              – JAB
              Jun 17 '10 at 17:44













            • Yeah, I'm looking for a 'pseudo' modal view controller. Modal within the specific tabs view. No UIKit elements exist for this?

              – Kevin Sylvestre
              Jun 17 '10 at 18:04






            • 1





              The simplest solution is to disable the controls you don't want activated and reenable them when your done.

              – TechZen
              Jun 17 '10 at 18:36






            • 1





              Apple suggest to use a modal view to present an alternative orientation view (e.g. landscape). developer.apple.com/library/ios/#featuredarticles/… For this reason, I have the same problem as the OP. How to show a modal view while without obscuring the Tab Bar.

              – Snips
              Jan 14 '11 at 23:45
















            5












            5








            5







            The entire point of a modal dialog box or view controller is to force the user to look at or do whatever the modal view is requesting, and prevent them from doing something else with that application. It seems to me that the best approach, if you still want to use a modal view controller, would simply be to have a "Cancel" button or something on the view controller. Since the profile tab can only be accessed after authentication in the first place, just have dismissing the view controller make the last-viewed tab the active tab.






            share|improve this answer















            The entire point of a modal dialog box or view controller is to force the user to look at or do whatever the modal view is requesting, and prevent them from doing something else with that application. It seems to me that the best approach, if you still want to use a modal view controller, would simply be to have a "Cancel" button or something on the view controller. Since the profile tab can only be accessed after authentication in the first place, just have dismissing the view controller make the last-viewed tab the active tab.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jun 17 '10 at 17:43

























            answered Jun 17 '10 at 17:30









            JABJAB

            16.6k35168




            16.6k35168








            • 1





              +1 The OP has a design problem because he doesn't actually want a model view. He just wants to block the operation within a single tab. Modal views are intended to block the entire interface.

              – TechZen
              Jun 17 '10 at 17:41






            • 1





              @TechZen: Indeed, and if I actually knew enough about UIKit I would have suggested something for that.

              – JAB
              Jun 17 '10 at 17:44













            • Yeah, I'm looking for a 'pseudo' modal view controller. Modal within the specific tabs view. No UIKit elements exist for this?

              – Kevin Sylvestre
              Jun 17 '10 at 18:04






            • 1





              The simplest solution is to disable the controls you don't want activated and reenable them when your done.

              – TechZen
              Jun 17 '10 at 18:36






            • 1





              Apple suggest to use a modal view to present an alternative orientation view (e.g. landscape). developer.apple.com/library/ios/#featuredarticles/… For this reason, I have the same problem as the OP. How to show a modal view while without obscuring the Tab Bar.

              – Snips
              Jan 14 '11 at 23:45
















            • 1





              +1 The OP has a design problem because he doesn't actually want a model view. He just wants to block the operation within a single tab. Modal views are intended to block the entire interface.

              – TechZen
              Jun 17 '10 at 17:41






            • 1





              @TechZen: Indeed, and if I actually knew enough about UIKit I would have suggested something for that.

              – JAB
              Jun 17 '10 at 17:44













            • Yeah, I'm looking for a 'pseudo' modal view controller. Modal within the specific tabs view. No UIKit elements exist for this?

              – Kevin Sylvestre
              Jun 17 '10 at 18:04






            • 1





              The simplest solution is to disable the controls you don't want activated and reenable them when your done.

              – TechZen
              Jun 17 '10 at 18:36






            • 1





              Apple suggest to use a modal view to present an alternative orientation view (e.g. landscape). developer.apple.com/library/ios/#featuredarticles/… For this reason, I have the same problem as the OP. How to show a modal view while without obscuring the Tab Bar.

              – Snips
              Jan 14 '11 at 23:45










            1




            1





            +1 The OP has a design problem because he doesn't actually want a model view. He just wants to block the operation within a single tab. Modal views are intended to block the entire interface.

            – TechZen
            Jun 17 '10 at 17:41





            +1 The OP has a design problem because he doesn't actually want a model view. He just wants to block the operation within a single tab. Modal views are intended to block the entire interface.

            – TechZen
            Jun 17 '10 at 17:41




            1




            1





            @TechZen: Indeed, and if I actually knew enough about UIKit I would have suggested something for that.

            – JAB
            Jun 17 '10 at 17:44







            @TechZen: Indeed, and if I actually knew enough about UIKit I would have suggested something for that.

            – JAB
            Jun 17 '10 at 17:44















            Yeah, I'm looking for a 'pseudo' modal view controller. Modal within the specific tabs view. No UIKit elements exist for this?

            – Kevin Sylvestre
            Jun 17 '10 at 18:04





            Yeah, I'm looking for a 'pseudo' modal view controller. Modal within the specific tabs view. No UIKit elements exist for this?

            – Kevin Sylvestre
            Jun 17 '10 at 18:04




            1




            1





            The simplest solution is to disable the controls you don't want activated and reenable them when your done.

            – TechZen
            Jun 17 '10 at 18:36





            The simplest solution is to disable the controls you don't want activated and reenable them when your done.

            – TechZen
            Jun 17 '10 at 18:36




            1




            1





            Apple suggest to use a modal view to present an alternative orientation view (e.g. landscape). developer.apple.com/library/ios/#featuredarticles/… For this reason, I have the same problem as the OP. How to show a modal view while without obscuring the Tab Bar.

            – Snips
            Jan 14 '11 at 23:45







            Apple suggest to use a modal view to present an alternative orientation view (e.g. landscape). developer.apple.com/library/ios/#featuredarticles/… For this reason, I have the same problem as the OP. How to show a modal view while without obscuring the Tab Bar.

            – Snips
            Jan 14 '11 at 23:45















            0














            Xcode 10:



            In the Attributes Inspector, inside View Controller section, you've the Presentation option.



            a) If you choose Over Current Context, the modal view just will appear over the view, but the Tab Bar will appear at the top of the view.



            b) Otherwise, if you choose Over Full Screen, the modal view will appears over all the UI, including tab bars.






            share|improve this answer






























              0














              Xcode 10:



              In the Attributes Inspector, inside View Controller section, you've the Presentation option.



              a) If you choose Over Current Context, the modal view just will appear over the view, but the Tab Bar will appear at the top of the view.



              b) Otherwise, if you choose Over Full Screen, the modal view will appears over all the UI, including tab bars.






              share|improve this answer




























                0












                0








                0







                Xcode 10:



                In the Attributes Inspector, inside View Controller section, you've the Presentation option.



                a) If you choose Over Current Context, the modal view just will appear over the view, but the Tab Bar will appear at the top of the view.



                b) Otherwise, if you choose Over Full Screen, the modal view will appears over all the UI, including tab bars.






                share|improve this answer















                Xcode 10:



                In the Attributes Inspector, inside View Controller section, you've the Presentation option.



                a) If you choose Over Current Context, the modal view just will appear over the view, but the Tab Bar will appear at the top of the view.



                b) Otherwise, if you choose Over Full Screen, the modal view will appears over all the UI, including tab bars.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 14 '18 at 0:28









                Stephen Rauch

                28.5k153557




                28.5k153557










                answered Nov 14 '18 at 0:08









                Ricardo IsidroRicardo Isidro

                316




                316






























                    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.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f3063916%2fmodal-view-controller-undesirably-hides-tab-bar%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

                    List item for chat from Array inside array React Native

                    Thiostrepton

                    Caerphilly