Does anyone have any recommendations on how to center a popover view controller on the screen? Thank you.
Yes sir I do. Thanks.
hi @jport1130,
The apple documentation states that you need to provide a source rect for the popover, now that you don’t have any sample code here, you can
- Instantiate your popupViewController
- set the sourceView to
self.view
(i.e. the view from where you are calling this) - set the source rect to
CGRect(x: view.center.x, u: view.center.y, width: 0, height: 0)
cheers,
This topic was automatically closed after 166 days. New replies are no longer allowed.