image - check if a UIbutton setImage is called in iOS -
is there simple way checking if setimage method of uibutton has been called? use storyboard place button (not should matter in case). (i.e. part of code) notified uibutton catimage
's setimage has been called.
there many ways notify object when particular event occurs in ios.
use delegate, when set image programatically call delegate method in other object notify event.
send nsnotification, when image set send out nsnotification. other object should observe notification.
[[nsnotificationcenter defaultcenter] postnotificationname:@"imageset" object:self userinfo:nil];
use key value observing. if value of image changes, other object notification.
Comments
Post a Comment