ios - AlertView 委托(delegate)方法alertViewShouldEnableFirstOtherButton 未调用Swift

标签 ios xcode swift uialertview

我正在创建此警报 View 并尝试使用委托(delegate)方法alertViewShouldEnableFirstOtherButton,但它没有被调用。 文档说它将在 iOS9 中弃用,但我正在使用 iOS8

    var alert = UIAlertView(title: "Edit collection name", message: "", delegate: self, cancelButtonTitle: "Cancel", otherButtonTitles: "OK")

    alert.alertViewStyle = UIAlertViewStyle.PlainTextInput

    alert.show()

*更新 Duncan 指出 UIAlertView 在 iOS8 中已弃用。

最佳答案

UIAlertView 在 iOS8 中已弃用。感谢@Duncan C

关于ios - AlertView 委托(delegate)方法alertViewShouldEnableFirstOtherButton 未调用Swift,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31118638/

相关文章:

iOS 自定义信息窗口 Google Maps SDK 1.7.2

ios - 同步函数调用

ios - UILabel 下边框和右边框

ios - 如何使根导航栏透明,但子导航栏不透明?

swift - 多个设备用于一次 Firebase 电子邮件身份验证

jquery - CSS3 中的滑动动画

ios - 什么时候获取 apple-app-site-association 文件?

ios - 我想创建一个允许我的用户删除 UIWebView 历史记录的操作

xcode - 如何象征从 Apple 收到的以 .txt 格式而不是 .crash 格式的崩溃报告

objective-c - NSTask 在 xCode 问题中启动