I am using a UIPresentationController
to show a custom modal. the presentation controller has a UIView
dimming view animated in an out when it is being shown. The modal itself is a UIViewController
added to the presentation controller's container.
The problem
I can only call [self dismissViewControllerAnimated:NO completion:nil]
from the embedded UIViewController. But I cannot do the same from the UIPresentationController
. But that's where the dimming view is.
I'd like to avoid adding additional invisible views to the modal or use NSNotificationCenter
if possible.
How do you dismiss a UIPresentationController
by tapping its dimming view? Does it make sense? Is it possible?