Phi*_*hil 2 iphone objective-c switch-statement
如果注释nslog-line,则会出错:
语义问题:使用未声明的标识符'alert'
switch ([[array objectAtIndex:0]intValue]) {
case 2:
NSLog(@"Allergie alarm"); << commenting this, gives me an error!!!
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle: @"blabal"
message: @"balbalb"
delegate: nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil, nil];
[alert show];
[alert release];
break;
default:
break;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1761 次 |
| 最近记录: |