如何在iOS 9 swift中正确呈现popover ArrowDirections

前端之家收集整理的这篇文章主要介绍了如何在iOS 9 swift中正确呈现popover ArrowDirections前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我一直试图找出如何解决问题.

在这个linepopover.permittedArrowDirections =(.Up | .Down)它说“没有更多的上下文,表达的类型是ambiquous”.

这是代码示例:

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

解决方法

请使用以下代码

popover.permittedArrowDirections = [ .Up,.Down ]

猜你在找的Xcode相关文章