I want to check different variables BUT if only just one meets the condition required then I get an alert view. I tried with if( && ) but it didn’t work the way I want it. I think what I am looking for is something like an “or” statement.
if(_d0 == 0 && _d1 == 0) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle: @"Input Error"
message: @"Need to Choose Sections"
delegate: nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
[alert release];
}
So I want it to check if _d0 = 0 or _d1 == 0 , even if one of these two is 0 i need the alert view to pop. The thing is that If i do separated statements, then if the user doesn’t choose any of the two sections,it will pop two alert views, which will be annoying cause in some cases the user needs to choose 5 different sections.
Yes, you want exactly