I am using Xcode 11.2.1 and I am getting a parse error of Expected ':'.
The section of code is:
-(IBAction)webview:(id)sender { if ([Web isEqualToString:@"Not Available"]){ UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"This airport does not have a Web site." message:Web delegate:self cancelButtonTitle:@"Close",nil otherButtonTitles:nil]; [alert show]; [alert release]; } else { AirportWebViewController *web = [[AirportWebViewController alloc] initWithNibName:@"AirportWebViewController" bundle:nil]; [web setTitle:@"Selected airport"]; [web setWeb:self.Web]; [self.navigationController pushViewController:web animated:YES]; } }
Can anyone see where I have missed the placement of the ":".
Many thanks in advance for your time and help.
cancelButtonTitle:@"Close",nil otherButtonTitles contains an extra nil, it should be cancelButtonTitle:@"Close" otherButtonTitles
cancelButtonTitle:@"Close",nil otherButtonTitles
nil
cancelButtonTitle:@"Close" otherButtonTitles
1.4m articles
1.4m replys
5 comments
57.0k users