Thursday, May 30, 2013

UIButton currentBackgroundImage example in Objective C (iOS).

UIButton currentBackgroundImage

The current background image displayed on the button. (read-only)

@property(nonatomic, readonly, retain) UIImage *currentBackgroundImage

Discussion of [UIButton currentBackgroundImage]
This value can be nil.


UIButton currentBackgroundImage example.
- (void)awakeFromNib
{
    NSLog(@"TestButton %p - background image %p %@", self, self.currentBackgroundImage, self.currentBackgroundImage);
}

Example of [UIButton currentBackgroundImage].
UIImage *image = self.myButton.currentBackgroundImage;

UIButton currentBackgroundImage example.
{
UIButton *clickedButton =(UIButton *)sender;
UIImage *myClickedImage = clickedButton.currentBackGroundImage;
//Jusqu'ici ca marche bien
//C'est ici que je meure
...
}

End of UIButton currentBackgroundImage example article.