Does anyone have any recommendations on how to center a popover view controller on the screen? Thank you.
Yes sir I do. Thanks.
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)