문제

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