顯示具有 ERROR 標籤的文章。 顯示所有文章
顯示具有 ERROR 標籤的文章。 顯示所有文章

2016年7月21日 星期四

[swift] Class MyViewController has no initializers - ERROR

If you have the error message , you can do this.

Class MyViewController has no initializers


var data:String

var data:String = ""
or 
var data:String?

[swift] nil cannot initialize specified type, swift

nil cannot initialize specified type
ERROR

var delegate:myDelegate = nil

change to 


var delegate:myDelegate? = nil