开发者

How to check if a button's image = nil?

I would like to check if one of my UIButton's image is equal to nil. Is there a way to do so? I wasn't sure abo开发者_如何学Pythonut myButton.image as it's not on Apple's developer Reference.


Apparently a UIButton has a property called currentImage and currentBackgroundImage. It will check for the current image (depending on state, for example pressed state or normal state).


Use - (UIImage *)imageForState:(UIControlState)state.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜