UIPopoverPresentation without arrow

I am trying to represent a UIViewController in a UIPopoverPresentationController , but I don't like the arrow function.

Basically, I want to use the UIPopoverPresentationController without the arrow that comes with it.

I am coding in Swift.

+6
source share
1 answer

This is what I did just a few days ago. What I did basically removed the arrow and left the source to itself. The source, of course, changed its Y-position to get a popover effect without an arrow. Try, work like a charm to me.

 yourPopoverPresentationController!.permittedArrowDirections = UIPopoverArrowDirection.init(rawValue: 0) let aView = //Source View that you would provide for the source rect yourPopoverPresentationController!.sourceView = aView let position = CGRectMake(aView.bounds.origin.x, aView.bounds.origin.y + 125, aView.bounds.size.width, aView.bounds.size.height) yourPopoverPresentationController!.sourceRect = position 

This led to the next effect that I need. enter image description here

+13
source

All Articles