Вопрос

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