I have the next code:
var imageArray = [UIImage]()
for photo in self.selectedPhotos {
imageArray.append(photo.thumbnail!)
}
let shareScreen = UIActivityViewController(activityItems: imageArray, applicationActivities: nil)
let navigationItemElement:UIBarButtonItem = (self.navigationItem.rightBarButtonItems?.first)!
let popover = UIPopoverController(contentViewController: shareScreen)
popover.presentPopoverFromBarButtonItem(navigationItemElement, permittedArrowDirections: UIPopoverArrowDirection.Any, animated: true)
And I have the next warning:
'UIPopoverController' was deprecated in iOS 9.0: UIPopoverController is deprecated. Popovers are now implementd as UIViewController presentations. Use a modal presentation style of UIModalPresentationPopover and UIPopoverPresentationController.
Anyone has an example?