Hi I'm new to iOS programming and trying to port my OS X Apps to IOS and I'm stuck in "UIAlertView" coding i keep on getting the warning "code will never be executed"
any fix for it, i also cant do it without the "else" in the statement as it will do whatever the last "if statement" is
Code:
- (IBAction)popup:(id)sender { UIAlertView *alertView; alertView = [[UIAlertView alloc] initWithTitle:@"the title" message:@"" delegate:nil cancelButtonTitle:@"cancel" otherButtonTitles:@"a", @"b" , @"c", nil]; [alertView show];
if (@"a") {
[sender setTitle: @"a"forState:UIControlStateNormal];
}else if(@"b") { // this line is where get the error
}
}
any fix for it, i also cant do it without the "else" in the statement as it will do whatever the last "if statement" is