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
.
精彩评论