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."

有帮助吗?

解决方案

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];

其他提示

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

- (id<UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController;
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top