I have a popover window that inherits from a base class that derives from uiview. What I want to do is prevent users from dismissing the window if they tap on the background. The problem is that since the popover does not derive from uipopover class, the events that can prevent the window from dismissing do not fire. At this point I would prefer not to change the base class to avoid creating a larger development effort. What are my options for preventing window dismissal in my case?
Asked
Active
Viewed 131 times
0
-
That's **not recommended**. Apple's HIG don't want you to use standard controls in non-standard ways. A user of your app would expect a popover to go away if the background is tapped. Unexpected behaviour confuses users. – duci9y Jul 30 '14 at 17:48
-
That makes sense but that is the requirement I am currently dealing with. I am looking for a technical approach for my problem but I appreciate your comment. – CodeMilian Jul 30 '14 at 17:59
-
I also want to add that when the a certain action is taken on the popover, the window resizes and requires user input. In here it is not expected to be able to dismiss as work may be lost in the process. – CodeMilian Jul 30 '14 at 18:03
-
If user input is **required**, then using a popover doesn't make sense at all. Are you allowed to use any other controls? Perhaps you can try explaining to your superiors that this behaviour would get the app rejected. – duci9y Jul 30 '14 at 18:17
-
If a popover allows for preventing a dismissal why would the app get rejected? – CodeMilian Jul 30 '14 at 18:21
-
A popover does not allow you to prevent a dismissal. [Relevant part of the HIG](https://developer.apple.com/library/ios/documentation/userexperience/conceptual/mobilehig/ContentViews.html#//apple_ref/doc/uid/TP40006556-CH13-SW19). – duci9y Jul 30 '14 at 18:25
-
I'd agree with duci9y. Trying to force Apple's built in functionality to bend to suit your logic isn't a good plan. If requirement requires the pop-up to remain on screen, build your own pop-up? From memory this is as simple as swapping out the Pop View controller for a regular view controller. 30 seconds to make it transparent 1 minute to your form view's frame. Your requirement is a valid one, you wouldn't use a cheese grater to cut hair, so don't try to use a convenient pop up as a modal view. Not being sarcastic, just trying to help you see it differently. – latenitecoder Jul 30 '14 at 18:26
-
>>If a popover allows for preventing a dismissal why would the app get rejected? - 51% sure. You could hack the popover will dismiss and re present it if not completed but seriously that would suck as an experience. – latenitecoder Jul 30 '14 at 18:28
-
As I mentioned before at some point the pop up requires user input and therefore the window should not dismiss. Dismissing a popover while requiring input would not be a good experience. What needs to happen is rather than reuse the popover when a certain action happens open a model, from here the model would not dismiss while requiring user input. I was looking for a simple out not have to redo a bunch of work already done. – CodeMilian Jul 30 '14 at 18:57