UIPopover without any arrows

前端 未结 17 1107
说谎
说谎 2020-12-08 02:15

Is it possible to present a popover without any sort of arrows pointing somewhere?

17条回答
  •  囚心锁ツ
    2020-12-08 02:36

    In swift 3, you can build a UIPopoverArrowDirection extension for this:

    extension UIPopoverArrowDirection {
        public static var noArrow: UIPopoverArrowDirection {
            return UIPopoverArrowDirection(rawValue: 0)
        }
    }
    

    and the you can do:

    popoverPresentationController!.permittedArrowDirections = .noArrow
    

提交回复
热议问题