载入 UIImage图片会报错,也不知道是什么缘故
/Users/Mini Golf/Mini Golf/MiniGolfViewController.swift:15:28: Value of optional type 'UIImage?' not unwrapped; did you mean to use '!' or '?'?
/Users/Mini Golf/Mini Golf/MiniGolfViewController.swift:15:28: Value of optional type 'UIImage?' not unwrapped; did you mean to use '!' or '?'?
和你的定义不符合, 所以要求
var playBall:UIImage? = UIMage(named:“***”)