Question

Since I moved to iOS 7.1 I keep getting the warning message for each one of my custom transitions. How to get rid of this:

"UIModalPresentationCustom presentation style can only be used with an animator or with unanimated dismissals."

Was it helpful?

Solution

I had this same problem. I had to retain the transitioning delegate in the presenting controller because it was nil when I went to dismiss from the presented controller.

@property (strong, nonatomic) YourTransitioningDelegate *transitioningDelegate;

@synthesize transitioningDelegate;

transitioningDelegate = [[YourTransitioningDelegate alloc] init];

UIViewController *presentingController = [[UIViewController alloc] init];
presentingController.transitioningDelegate = transitioningDelegate;
[self presentViewController:presentingController];

OTHER TIPS

I had the same warning, but what I did was implement animationControllerForDismissedController from UIViewControllerTransitioningDelegate protocol.

- (id<UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top