How can I fix the “UIPopoverController is deprecated” warning?
You no longer need UIPopoverController for presenting a view controller. Instead you can set the modalPresentationStyle of view controller to UIModalPresentationPopover. You can use the following code for that: avc.modalPresentationStyle = UIModalPresentationPopover; avc.popoverPresentationController.sourceView = theButton; [self presentViewController:avc animated:YES completion:nil]; UIModalPresentationPopover In a horizontally regular environment, a presentation style where the content is displayed in a … Read more