what is the proper syntax for putting together and & or statements?
I am trying to implement some code to validate the data a user is inputting. I have a segmented control, a text view and a next page button. To advance to the next view controller the user must choose "yes" or "no" on the segmented control and if yes is selected they must enter some text into the text view.
- (IBAction)nextPageButton:(UIBarButtonItem *)sender {
if (weatherDelayString == nil || ([weatherDelayString isEqual: @"YES"] && weatherDelayTextView.text == nil)) {
NSLog(@"nothing selected");
}else{
vc7Signature *vc7 = [[vc7Signature alloc]initWithNibName:nil bundle:nil];
[self presentViewController:vc7 animated:YES completion:nil];
}}
Could someone clarify the syntax required to implement this logic?