如何在 iOS 9 swift 中正确显示弹出框 ArrowDirections

How to present popover ArrowDirections properly in iOS 9 swift

我一直在努力找出如何解决这个问题。

这一行popover.permittedArrowDirections = ( .Up | .Down )上面写着"Type of expression is ambiquous without more context."

代码示例如下:

if let popover = alert.popoverPresentationController
        {
        popover.sourceView = imageView
        popover.sourceRect = imageView.bounds
        popover.permittedArrowDirections = ( .Up | .Down )
        }

请使用以下代码:

popover.permittedArrowDirections = [ .Up, .Down ]