gpt4 book ai didi

ios - Swift - UIAlertController 没有显示任何内容

转载 作者:行者123 更新时间:2023-11-28 07:11:47 28 4
gpt4 key购买 nike

我做错了什么?我已经在 iOS 8.1 模拟器和装有 iOS 8.1 的 iPod Tocuh 5G 上对此进行了测试。

var alert = UIAlertController(title: "Also save this picture?", message: "Adding this picture to your Camera Roll might be a good idea.", preferredStyle: UIAlertControllerStyle.Alert)
alert.addAction(UIAlertAction(title: "Yes", style: UIAlertActionStyle.Default, handler: { (action: UIAlertAction!) in
UIImageWriteToSavedPhotosAlbum(takenImage, nil, nil, nil)
}))
alert.addAction(UIAlertAction(title: "No", style: UIAlertActionStyle.Cancel, handler: nil))
self.presentViewController(alert, animated: true, completion: nil)

最佳答案

就其值(value)而言,我无法让 UIAlertControllers 显示出来,除非我将 View 嵌入到导航 Controller 中(因此使用 Xcode 6 的默认“单一 View ”模板可以像这样为您设置它)。

关于ios - Swift - UIAlertController 没有显示任何内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28185051/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com