Can I remove the arrow in the popover view?

人走茶凉 提交于 2019-12-03 07:54:35

Hiding the popover arrow or showing one popover inside another does not sound very wise. I’m not sure if this is explicitly forbidden by the HIG, but it’s a usability drawback anyway. If you insisted you could draw your own arrowless popover or try to mask the arrow using some view composed on the top of it. I think it would be much better to rethink the UI.

Phil

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];

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."

myViewController.popoverPresentationController.permittedArrowDirections = UIPopoverArrowDirection(rawValue: 0)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!