How to present popover ArrowDirections correctly in iOS 9 swift

I tried to figure out how to solve this problem.

This line popover.permittedArrowDirections = ( .Up | .Down )says: "The type of expression is ambivalent without additional context."

Here is a sample code:

if let popover = alert.popoverPresentationController
        {
        popover.sourceView = imageView
        popover.sourceRect = imageView.bounds
        popover.permittedArrowDirections = ( .Up | .Down )
        }
+4
source share
1 answer

Please use below code:

popover.permittedArrowDirections = [ .Up, .Down ]
+5
source

Source: https://habr.com/ru/post/1612819/


All Articles