我在 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/