Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

asing188

macrumors newbie
Original poster
Jul 4, 2009
1
0
I am writing a simple multiview app with the following header and implementation files:


#import <UIKit/UIKit.h>

@class SwitchViewController;

@interface View_SwitcherAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
SwitchViewController *switchViewcontroller;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet SwitchViewController *switchViewController;

@end

---------

#import "View_SwitcherAppDelegate.h"
#import "SwitchViewController.h"


@implementation View_SwitcherAppDelegate

@synthesize window;
@synthesize switchViewController;
^___ error:synthesized property 'switchViewController' must either be named the same as a compatible ivar or must explicitly name an ivar

-------

Can anyone help to point out what's the problem and how to resolve this error?

Many thanks.
 
Code:
SwitchViewController *switchViewcontroller;

@property (nonatomic, retain) IBOutlet SwitchViewController *switchViewController;

@synthesize switchViewController;

Which of these things is not like the others?
 
Code:
SwitchViewController *switchViewcontroller;

@property (nonatomic, retain) IBOutlet SwitchViewController *switchViewController;

@synthesize switchViewController;

Which of these things is not like the others?

is this like those "find the difference"-pictures? :D
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.