我收到以下错误:
on the line self = [super init];
无法在方法初始化系列之外分配自我
在所有 self.whatever = 上也有黄色三角形;
“whatever”的本地声明隐藏了实例变量
@synthesize firstName, lastName, emailAdress, password, admin;
//current course funkade med nil men inte @"" vrf ;P
-(id) init
{
return [self initwithName:@"" lastName:@"" password:@"" admin:@"" currentCourse:nil];
}
-(id) initwithName:(NSString *) firstName
lastName:(NSString *) lastName
password:(NSString *) password
admin:(NSString *) admin
currentCourse:(NSDictionary *) course
{
self = [super init];
if (self) {
self.firstName = firstName;
self.lastName = lastName;
self.password = password;
self.admin = admin;
}
return self;
}