- (IBAction) createAccount: (id) sender {
NSString *post =[NSString stringWithFormat:@”name=%@&password=%@&email=%@”,nameField.text, passwordField.text, emailField.text];
NSString *hostStr = @”domain.tk/in-app/account/create-account.php?”;
hostStr = [hostStr stringByAppendingString:post];
NSData *dataURL = [NSData dataWithContentsOfURL: [ NSURL URLWithString: hostStr ]];
NSString *serverOutput = [[NSString alloc] initWithData:dataURL encoding: NSASCIIStringEncoding];
if([serverOutput isEqualToString:@”Yes”]){
UIAlertView *alertsuccess = [[UIAlertView alloc] initWithTitle:@”Congrats” message:@”Your account has bee succesfully created. “
delegate:self cancelButtonTitle:@”OK” otherButtonTitles:nil, nil];
[alertsuccess show];
[alertsuccess release];
} else {
UIAlertView *alertsuccess = [[UIAlertView alloc] initWithTitle:@”Error” message:@”We are sorry, but an error has been encountered, please try agian later.”
delegate:self cancelButtonTitle:@”OK” otherButtonTitles:nil, nil];
[alertsuccess show];
[alertsuccess release];
}
}
我在几乎所有带有@ 的行上都收到错误,我该如何解决这个问题?我(想我)已经综合了我所有的字段,并在@interface 中做了 IBOutlet,并在@interface 下方给了它们@属性。我不知道如何解决这个问题,我错过了什么!