Reputation: 9120
I'm trying to assign an "Image" to "Button", but for reason the "Image" doesn't load.
UIImage *bottonImage = [UIImage imageNamed:@"bocinaMute.png"];
[self.botton.imageView setImage:[UIImage imageNamed:@"mute.png"]];
When I print it in the console the value of the imageView
is:
po _botton.imageView
<UIImageView: 0x15f53a390; frame = (0 0; 0 0); clipsToBounds = YES; hidden = YES; opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x170235c20>>
What am I doing wrong?
Upvotes: 0
Views: 69
Reputation: 3506
Use this:
[btnTwo setImage:[UIImage imageNamed:@"mute.png"] forState:UIControlStateNormal];
instead of
[self.botton.imageView setImage:[UIImage imageNamed:@"mute.png"]];
Upvotes: 5