I’m a beginner to Iphone Development 🙂
I am trying to make a button change an image. So I have my button
- (IBAction)myButton {
myUIImageView.image = [UIImage imageNamed:@"myPhoto.png"];
}
I created a UIImageView in IB and I named the label and the name of this ‘myUIImageView’ but XCode is telling me that it’s undeclared. So my question is how do I associate this UIImageView with myUIImageView. Or perhaps how do I reference this UIImage in my myButton IBAction?
Any advice would help, thanks alot!
In your .h, you need this ivar between the curly braces
And after the close and before the @end, you need
and in the .m, after the @implementation line
(release in your dealloc and viewDidUnload)
Now,