objective-c - SCLAlertView 未显示

标签 objective-c swift alert

我在 objective-c 中实现了 SCLAlertView。现在我们将项目移植到swift。我已在桥接头文件中添加了 SCLAlertView.h。没有问题。

我编写的代码没有任何错误,但在执行代码时没有显示警报。

let alert = SCLAlertView()

alert.showError("Title", subTitle: "This is a message", closeButtonTitle: "OK", duration: 0.1)

最佳答案

替换这个

alert.showError("Title", subTitle: "This is a message", closeButtonTitle: "OK", duration: 0.1)

alert.showSuccess(self, title: "Title", subTitle:"This is a message", closeButtonTitle: "OK", duration: 0.1)

关于objective-c - SCLAlertView 未显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41870182/

相关文章:

ios - 编辑 Storyboard时 Xcode 7.x 崩溃

swift - 如何消除重载函数的歧义

ios - Alamofire HTTPS 请求失败

JavaScript 警报在 Firefox 6 中不起作用

ruby - 无法让 Sinatra Flash Gem 工作

带有警报弹出窗口的 jQuery 验证插件 - 仍然出现 - 用户无法在选择框中选择正确的值

ios - 如何将2个UIpickerView添加到一个UIview中?

objective-c - 在 Objective-C 中确定屏幕位置 (NSScreen)

ios - Twisted Server/iOS 客户端发送和接收图像

swift - 来自 Swift 中字符串的类似 Heredoc 的语法