使用UIPopoverPresentationController在弹出窗口中呈现视图控制器,您可以定义permittedArrowDirections属性来限制弹出窗口定位的可能性。我们可以使用|operator 定义多个方向:
presentationController.permittedArrowDirections = UIPopoverArrowDirectionDown|UIPopoverArrowDirectionUp;
我知道控制器会根据可用空间自动选择这些方向之一。
但是可以定义订单优先级吗?这样:如果A和B两个方向都有足够的空间,请优先使用A。
我试图颠倒 and 的顺序UIPopoverArrowDirectionDown,UIPopoverArrowDirectionUp但它似乎总是优先考虑UIPopoverArrowDirectionDown。
有没有人有实现这一目标的想法?