Using UIPopoverPresentationController
to present a view controller in a popup, you can define permittedArrowDirections
property to restrict the popup positioning possibilities. We can define multiple directions using |
operator :
presentationController.permittedArrowDirections = UIPopoverArrowDirectionDown|UIPopoverArrowDirectionUp;
I know that the controller will automatically choose one the those directions, according to available space.
But is it possible to define order priority ? In that way : if there is enough space for both directions A and B, use A in priority.
I've tried to reverse the order of UIPopoverArrowDirectionDown
and UIPopoverArrowDirectionUp
, but it seems to always prioritize on UIPopoverArrowDirectionDown
.
Does anybody has an idea to achieve this ?