请问我这样定义一个UIImage变量为什么会出错?
The picture name already contains a picture, right? You can do it directlyvar iv : UIImage = 图片
var iv : UIImage = 图片
You have not modified the content of the "" part in (named: ""). Just change it to the name of the image you want (in the image asset or main bundle).
Using Xcode’s image auto-completion function returns a UIImage, so there is no need to use the UIImage constructor
DirectVar iv: UIImage = 图片
Var iv: UIImage = 图片
Please add that you need to upgrade to Swift 3 to use this feature
The picture name already contains a picture, right?
You can do it directly
var iv : UIImage = 图片
You have not modified the content of the "" part in (named: ""). Just change it to the name of the image you want (in the image asset or main bundle).
Using Xcode’s image auto-completion function returns a UIImage, so there is no need to use the UIImage constructor
Direct
Var iv: UIImage = 图片
Please add that you need to upgrade to Swift 3 to use this feature