dogo / SCLAlertView

Beautiful animated Alert View. Written in Objective-C
MIT License
3.5k stars 534 forks source link

SCLAlertView *alert = [[SCLAlertView alloc] initWithNewWindowWidth:300.0f]; self.username = @"zaxo"; self.password = @"pass"; UITextField *usernameTextField = [alert addTextField:@"username"]; UITextField *passwordTextField = [alert addTextField:@"password"]; passwordTextField.secureTextEntry = YES; [alert addButton:@"Login" actionBlock: ^(void){ BOOL isUsersEqual = [self.username isEqualToString:[self.usernameTextField text]]; BOOL isPasswordsEqual = [self.password isEqualToString:[self.passwordTextField text]]; if(isUsersEqual && isPasswordsEqual){ NSLog(@"Successful"); } else { NSLog(@"frailer"); } @@@@@@@@ Why I can't compile it I even have set the @Property (nonatomic, strong) NSString *username; in SCLALertView.m but I still errors do im doing anthing please can you help Tweak.xm:350:1: error: use of undeclared identifier 'self' self.username = @"zaxo"; #293

Closed zakhoy closed 3 years ago