【问题标题】:UIAlertController EXC_BAD_ACCESS error - SwiftUIAlertController EXC_BAD_ACCESS 错误 - Swift
【发布时间】:2014-06-11 14:00:11
【问题描述】:

我正在尝试在 iOS 7 中使用 Swift 中的 UIAlertController,当出现警报时,我不断收到以下错误:EXC_BAD_ACCESS (code = 1, address = 0x10)

这是警报的代码。

var alert:UIAlertController = UIAlertController(title: "Ooops", message: "Please Fill In Everything", preferredStyle: UIAlertControllerStyle.Alert)
        alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil))
        self.presentViewController(alert, animated: true, completion: nil)

【问题讨论】:

    标签: ios swift uialertcontroller


    【解决方案1】:

    UIAlertController 仅从 iOS 8.0 开始可用。你还是应该改用UIAlertView

    【讨论】:

    • Gaaaah...我正在尝试使用这么多新的可用功能,以便我的工作是最新的,但它们与 iOS 7 不兼容。=/
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-18
    • 2012-02-26
    • 2012-04-23
    • 1970-01-01
    相关资源
    最近更新 更多