I am asked to removed the arrow of the popover view.
For Swift
popoverMenuViewController?.permittedArrowDirections = UIPopoverArrowDirection(rawValue:0)
Sure thing, and there is plenty of call for this, specifically when the popover is large enough and the point at where the arrow would point would be obscured.
There's no usability drawback whatsoever.
[pop presentPopoverFromBarButtonItem:_toolbarBtnImage2
permittedArrowDirections:0 // <- pass in zero for no arrows
animated:YES];
popoverMenuViewController?.permittedArrowDirections = []
The omission or removal of the arrow is implicitly banned by the 2012-03-07 Human Interface Guidelines, p. 114: "A popover ... always displays an arrow that indicates the point from which it emerged."
Just to add some sugar and Swifty the code :
Extension:
extension UIPopoverArrowDirection {
static var none: UIPopoverArrowDirection { UIPopoverArrowDirection(rawValue: 0) }
}
Usage:
popoverMenuViewController?.permittedArrowDirections = .none
you can change the variable's name to fits your needs.
myViewController.popoverPresentationController.permittedArrowDirections = UIPopoverArrowDirection(rawValue: 0)