Re: Popover arrow point never properly aligned
Re: Popover arrow point never properly aligned
- Subject: Re: Popover arrow point never properly aligned
- From: Logan Cautrell <email@hidden>
- Date: Wed, 01 Jun 2016 06:14:04 -0500
I would check the sourceRect property on UIPopoverPresentationController.
If you want precise control over the positioning, then you may need a custom view in a UIBarButton. You can calculate the position and update the sourceRect accordingly.
-logan
> On May 26, 2016, at 7:08 PM, Rick Mann <email@hidden> wrote:
>
> I'm presenting a popover from a UINavigationBar UIBarButtonItem. The point of origin of the popover never seems to come out of the center of the UIBarButtonItem. The code I'm using is:
>
> @IBAction
> func
> shareModel(inSender: AnyObject)
> {
> if let model = self.model
> {
> let source = ModelShareActivitySource(model)
> let avc = UIActivityViewController(activityItems: [source], applicationActivities: nil)
> avc.popoverPresentationController?.barButtonItem = self.shareButton
> presentViewController(avc, animated: true, completion: nil)
> }
> }
> @IBOutlet weak var shareButton: UIBarButtonItem!
>
> Is anyone else seeing this?
>
> --
> 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
_______________________________________________
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