Adapting between two different UIPresentationController

I would like to adapt between two different `UIPresentationController`, according to the current trait collection. For example, the two controllers could be `UIPopoverPresentationController` for any traits and a custom `UIPresentationController` for compact horizontal traits (e.g. iPhone).


Unfortunately this doesn't seem possible in the latest iOS 8. In particular:

  • You can set a `UIAdaptivePresentationControllerDelegate` to swap out the presentation style, but only permits the standard full screen presentation controller.
  • You can choose which presentation controller to use just before presenting the view controller, but this doesn't actually adapt after presenting when the traits collection changes e.g. in iPad multitasking or orientation change.


Any suggestions?


Cheers

Glen Low

Pixelglow Software

get.instaviz.com

Accepted Reply

Hi pixelglow


You are correct, adapting between two custom presentation controllers is not currently possible. Please file an enhancement request.

Replies

Hi pixelglow


You are correct, adapting between two custom presentation controllers is not currently possible. Please file an enhancement request.

How about between UIPopoverPresentationController and a custom presentation controller?

Is this possible yet? I'm trying to do the same, iOS 11+

At least for Apple it seems to be possible (in Numbers they swap a popover against a slide in). But there does not seem to be a public API.