I\'ve gotten an ActionSheet to present just fine on an iPhone device. But it crashes for iPad. Says it needs the location for the popover. Has anyone had luck with this code? I\
Here's my workaround for the bug - it maintains the "actionsheet" functionality for iPhone devices but simply creates an "alert" style controller for iPad
It's simple enough for my case and may help others
var preferredStyle: UIAlertController.Style
if UIDevice.current.userInterfaceIdiom == .pad {
preferredStyle = .alert
}
else{
preferredStyle = .actionSheet
}
let cellMenu = UIAlertController(title: nil, message: "Bought Item?", preferredStyle: preferredStyle)
//Create actions
//Add Actions to menu
self.present(cellMenu, animated: true, completion: nil)