how to check whether image object has value

前端之家收集整理的这篇文章主要介绍了how to check whether image object has value前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

UIImage can not be nil in fact.

there are two ways to check whether image object has value Way 1: let uiimage as UIImage? and then set it initially to nil Way2: check its size property. if size is zero,it properly is empty object.

猜你在找的Swift相关文章