0

我正在尝试将我的项目转换为 Swift 2.0。我有一个自定义 UIButton,现在在我尝试构建时会导致错误。我的代码是:var myButton = MyCustomButton.buttonWihType(.Custom) as UIButton

这适用于我在 Swift 1.2 中的项目,但现在不起作用。该按钮使用 UIButton 文件来绘制它,称为MyCustomButton

谢谢

4

1 回答 1

4

你试过这个吗?

var myButton = MyCustomButton(type: .Custom) 
于 2015-06-11T11:11:01.037 回答