Popover anchors are frequently in the wrong place
Popover anchors are frequently in the wrong place
- Subject: Popover anchors are frequently in the wrong place
- From: Rick Mann <email@hidden>
- Date: Tue, 03 May 2016 14:32:42 -0700
I have a simple UINavigationController stack with a single VC. The nav bar has an Action UIBarButtonItem. I present a UIActivityViewController and set the .popoverPresentationController?.barButtonItem to my bar button item.
But the anchor point is not in the center of the bar button item, it's more like in the lower-right.
I had similar behavior when I was popping one up from a UIButton in a different part of my UI. I fixed that by also specifying the source rect. But there's not really a frame for UIBarButtonItems (curse you, Apple, for not making those views). All the methods for getting a frame are really hacky.
For a long time now, I've had problems with popovers not anchoring to the right place. Why does the default API do this so badly? Am I just missing something?
--
Rick Mann
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden