如果变量 x 高于 1000,我想让警报视图弹出。在 iPhone 的 Xcode 中,Xcode 给出错误:“if”前面的预期表达式
到目前为止,这是我的代码:
if (x>1000) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Title", nil)
message:NSLocalizedString(@"Message", nil)
delegate:nil
cancelButtonTitle:NSLocalizedString(@"OK", nil)
otherButtonTitles:nil];
[alert show];
[alert release];
}