“Instance will be immediately deallocated because property ‘imageView’ is ‘weak’”error handling

(imageView,weak,error handling)

在使用IBOutlet更改image view時
如果出現下圖警示

Instance will be immediately deallocated because property ‘imageView’ is ‘weak’

可以參考本文進行排除警示

修改為

imageView.image = UIImage(named: kImage.loginLogoImage)

就不會出現警示訊息

--

--