and & or ステートメントをまとめる適切な構文は何ですか?
ユーザーが入力しているデータを検証するコードを実装しようとしています。セグメント化されたコントロール、テキスト ビュー、次のページ ボタンがあります。次のView Controllerに進むには、ユーザーはセグメント化されたコントロールで「はい」または「いいえ」を選択する必要があり、「はい」を選択した場合、テキスト ビューにテキストを入力する必要があります。
- (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];
}}
誰かがこのロジックを実装するために必要な構文を明確にすることができますか?