QLPreviewController loses touch after presenting a modal view controller over it - ios

In an iPad master-detail application (the master is an UITableViewController and the detail a QLPreviewController) whenever I present a view controller modally and then dismiss it, the QLPreviewController stops receiving touch events or at least reacting to them. So, it's no longer possible to zoom in or out, or "bouncing" an image/document currently being shown, even after another image/document is selected and shown.
Keep in mind that before presenting the view controller modally everything works as expected and it's possible to zoom in/out.
Anyone knows a possible solution for this weird problem?
EDIT: added that this happens after dismissing the view controller presented modally.
EDIT 2: if the presentation style is UIModalPresentationFormSheet, the problem does not occur. It seems to only occur with UIModalPresentationFullScreen.

Although not a solution for this problem, a workaround is to present the view controller as UIModalPresentationFormSheet instead of fullscreen.

Yes that is expected behaviour.
When a ViewController is presented modally (I assume you are presenting something in a form sheet?), it prevents other view controllers receiving touch events.
The other alternative is to have a look at child view controllers as an alternative; but again, their touch events will take precedence over anything underneath.

Related

With a custom navigation controller push transition, how do I have the previous view controller behind like modal presentations?

When performing a custom modal view controller transition, the view controller you're coming from sits behind the new one nicely (think of Apple's "form sheet" style presentation on an iPad for instance), and when you rotate the device the previous view controller visible in the back rotates as well.
I'm unsure how to get this functionality with a UINavigationController custom push animation. It seems it isn't expected for the previous view controller to be visible from behind and it isn't.
I could take a screenshot, but it won't update on landscape rotation.
How is it done so easily with a modal transition and how do I replicate that for navigation controller custom transitions?
As far as I understand the UINavigationController class such functionality cannot be achieved through it.
UINavigationController is a container controller, which can show only one VC within it at a time. It keeps all the VCs in the stack, but not their views (views are kept by VCs themselves).
Unlike it, the modal presentation is a special type of VC-presentation, and it's not limited by the container-functionality.

Dismissing Modal View Controller Causes Multiple VC's to Close

This question is hard for me to ask without a reference, so please see the image above. I am trying to dismiss the modal view controller on the far right of my storyboard.
The problem is when the view controller on the right hand side it dismissed and the user is returned to the middle view controller in the storyboard above, then immediately the next two view controllers are dismissed and the user is returned to the left most view controller.
I have only called the dismiss method on the right most view controller. I am wondering why this happens?
I have fiddled with the kind and presentation style of the segue to no avail. I have also tried using delegation and calling the dismiss method in the presenting view controller. This still results in the same unexpected behavior.
Any help would be great.

iPhone popover controller present view controller fullscreen

I am using a third party popover controller on the iphone and have ran across an issue. The one I'm using is WYPopoverController but have tried using FPPopover and it has the same "issue" since they work in a similar way. Here is the deal:
I have a notifications button in my app which pops up a popover controller which contains the notifications feed. It's like the Facebook app. You can see it on the below image.
Now what I want to do it so present a view controller on top of everything and in full screen. The way that popover controller works is that it ads its view directly to the applications main window and its not nested in the view hierarchy so I get a warning saying presenting view controllers on detached view controllers is discouraged and it does not present full screen as well (I know thats logical). If I present it on the parent view controller (the red one in the background) it gets presented below the popover view.
How to fix this?
I was thinking about using a new UIWindow instance and using a root view controller there. Is this an OK solution or is it a hack? If it's ok then how do I accomplish this? I want the presentation and dismissal to be animated :)
I want it to look like Facebok Paper app when you tap an item in the notifications feed.

Modal view gets moved to the back when autorotating with MGSplitViewController in iOS 5.x

I've successfully implemented MGSplitViewController in my application and it seems to work pretty well but in iOS 5.x, it has this weird issue.
I start my app with its MGSplitViewController as the root view controller in Portrait.
Trigger my full screen modal view controller that gets displayed over top successfully.
Rotate device to Landscape and the view disappears but there's a piece of it still showing through the split view slider.
Has anyone seen this and/or fixed it? It works just fine in iOS 6.
If I rotate the view back or try to open other modal views, nothing happens. It's like that modal view is stuck behind.
Note: This is how I setup my MGSplitViewController: Known effort to update MGSplitViewController for iOS5 and Storyboards?
Ok well I figured out what the problem was.
I was presenting my modal views (and segues) from the tab Controller or the detail view controller and the modal views (and global modal segues) needed to be presented from the MGSplitViewController instead.
When I was using UISplitviewController, I had been able to present the modal views/segues from that controller but when I switched to MGSplitViewController, it was not represented in the storyboard so I tried setting global modal segues (such as login) to the tab bar controller which is the master controller. This seemed to cause the issue.
For modal views, I ended up presenting them from the MGSplitViewController and I had to remove the segue I had and simply present any modal view controllers I had previously segued directly from the MGSplitViewController instead.

UIPopover locking background view

I am trying to replicate the iPad passcode view. Which basically is a popover with no arrow direction, that locks the background view kinda like a modal view controller.
My question: Is there a way to lock the underlying background view when presenting a popover.
My idea: The only real solution that i could come up with is placing that popover inside a modal view controller. and presenting it that way.
Thoughts?
Use the modalInPopover property of your view controller: http://developer.apple.com/iphone/library/documentation/uikit/reference/UIViewController_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40006926-CH3-SW72
This question provides some information on making a popover with no arrows, though it's not clear whether it's correct or not: UIPopover without any arrows

Resources