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.
+3
A:
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.
JAB
2010-06-17 17:30:13
+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
2010-06-17 17:41:19
@TechZen: Indeed, and if I actually knew enough about UIKit I would have suggested something for that.
JAB
2010-06-17 17:44:42
Yeah, I'm looking for a 'pseudo' modal view controller. Modal within the specific tabs view. No UIKit elements exist for this?
Kevin Sylvestre
2010-06-17 18:04:08
The simplest solution is to disable the controls you don't want activated and reenable them when your done.
TechZen
2010-06-17 18:36:00