Enable User Interaction on the Presenting View Controller when using a custom UIPresentationController

I'm using a custom UIPresentationController. I'd like the replicate the behavior of UISheetPresentationController and allow user interaction the presenting view controller when the presented view controller does not cover the entire screen.

I tried this:

-(void)presentationTransitionDidEnd:(BOOL)completed
{
   UIView *theView = self.presentingViewController.view;
    theView.userInteractionEnabled = YES;    
}

But has no effect. Is it possible to achieve this behavior? Thanks in advance

Solution from this Stackoverflow post seems to work:

https://stackoverflow.com/questions/28500507/can-i-make-a-uipresentationcontroller-have-userinteractionenabled-on-presentingv

But was hoping for a more elegant way.

Accepted Answer

Solution from this Stackoverflow post seems to work:

https://stackoverflow.com/questions/28500507/can-i-make-a-uipresentationcontroller-have-userinteractionenabled-on-presentingv

But was hoping for a more elegant way.

Enable User Interaction on the Presenting View Controller when using a custom UIPresentationController
 
 
Q