name
変数 ( 、adres
、code
など) がではないことを確認したいnil
。これが私が試したことです:
if (name == nil && adres == nil && code == nil && place == nil && telNr == nil && mail == nil) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"EXAMPLE"
message:@"EXAMPLE "
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
} else { //do the rest }
問題は、変数の 1 つが nil でない場合、else ステートメントを実行することですが、どの変数も nil でないことを確認したいと考えています。
|
代わりに試してみまし&&
たが、もちろんそれよりも悪いです。