Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将我的项目转换为 Swift 2.0。我有一个自定义 UIButton,现在在我尝试构建时会导致错误。我的代码是:var myButton = MyCustomButton.buttonWihType(.Custom) as UIButton
var myButton = MyCustomButton.buttonWihType(.Custom) as UIButton
这适用于我在 Swift 1.2 中的项目,但现在不起作用。该按钮使用 UIButton 文件来绘制它,称为MyCustomButton
MyCustomButton
谢谢
你试过这个吗?
var myButton = MyCustomButton(type: .Custom)