Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/112.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 自定义UIButton Swift 2.0_Ios_Swift_Uibutton_Ios9 - Fatal编程技术网

Ios 自定义UIButton Swift 2.0

Ios 自定义UIButton Swift 2.0,ios,swift,uibutton,ios9,Ios,Swift,Uibutton,Ios9,我正在尝试将我的项目转换为Swift 2.0。我有一个自定义UIButton,当我尝试构建时,它现在会导致错误。 我的代码是:var myButton=MyCustomButton.buttonWihType(.Custom)作为UIButton 这是我在Swift 1.2中的项目,但现在不起作用。该按钮使用一个名为MyCustomButton 谢谢你试过这个吗 var myButton = MyCustomButton(type: .Custom) 你试过这个吗 var myButton

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

这是我在Swift 1.2中的项目,但现在不起作用。该按钮使用一个名为
MyCustomButton

谢谢你试过这个吗

var myButton = MyCustomButton(type: .Custom) 
你试过这个吗

var myButton = MyCustomButton(type: .Custom)