在运行 iOS7 的iPad上,UIActionSheet 实例的显示效果不正确。由于某种原因,它们会显示取消按钮,并且遗漏最后一个按钮。相同的代码在iOS8上运行良好。
你可能期望取消按钮被忽略,因为在屏幕其他位置轻触将关闭操作表。有人知道这是为什么吗?
两种情况下使用完全相同的代码:
// Create UIActionSheet
let mapOptions = UIActionSheet(title: "Select map type", delegate: self, cancelButtonTitle: "Cancel", destructiveButtonTitle: nil, otherButtonTitles: "Standard", "Hybrid", "Satellite")
// Display from bar button
mapOptions.showFromBarButtonItem(self.mapTypeButton, animated: true)