有人可以看看我的代码,并告诉我我做错了什么?因为它是在文档中指定我的代码编写一模一样,但我得到一个错误说“利用未解决的标识符ToastStyle的”斯威夫特吐司不工作在斯威夫特3
func showToast() {
let style = ToastStyle()
style.messageColor = UIColor.white
self.view.makeToast("Product added successfully!", duration: 3.0, position: .bottom, style: style)
}
@IBAction func saveProduct(_ sender: AnyObject) {
self.showToast()
}
做您导入框架项目 – Lamar
是的,顺序如下: 1)增加依赖于我的Procfile 2)然“吊舱安装” 3)增加了“进口Toast_Swift”我的ViewController –
现在我得到错误说“加载底层模块Toast_Swift” –