well i was watching a programing tutorial and when i copy the code i keep getting an error saying
type of property 'bg' (UIImageView*) does not match type of ivar 'bg'(UIImage*__strong)
i'm programing in xcode 4.2.1 in single view controller

my code is:

@interface ViewController : UIViewController{
UIImage * bg;
}
@property(nonatomic,retain) IBOutlet UIImageView *bg;
---------------------------------------------------------
@implementation ViewController
@synthesize bg; // this is where the error comes up

Recommended Answers

All 2 Replies

wow!!!! im stupid lol found my mistake lol..........

For others that come along, I'm pretty sure the error was that bg was being declared as UIImageView in the property but as UIImage in the interface declaration.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.