How to present a popover with animation?

I am currently using presentPopoverFromRect:inView:permittedArrowDirections:animated: to represent my popover. But I'm looking for more fancy animations (like popover expanding from a certain point) to represent a popover.

I tried searching with the keywords ios present popover animation , but cannot find any useful results. Not sure if I am using the wrong keywords or it is impossible to imagine popovers with animations.

+7
source share
2 answers

When using UIPopover there is currently no easy way to present it with a different animation than the one that iOS provides. Of course, it would be possible to create custom animations to present the presentation, but this will be a very significant amount of additional work, since you will have to do everything yourself. Two things you could pay attention to if you really need to:

+2
source

As in iOS 7.0, you can imagine any kind of view controller so that it does not completely hide the previous view controller, which allows you to create "fake" popovers. Using the UIViewControllerTransitioningDelegate protocol, you can create any animation you would like.

Here is a good example of how to create a fake popover with custom animations.

+2
source

All Articles