1
- (void)showMessageError {
alertMessage = [[UIAlertView alloc] initWithTitle:@"Impossible"
                                                  message:@"Here are the problems:\n%@,\n%@,\n%@",self.Error1,self.Error2,self.Error3
                                                 delegate:self
                                                 cancelButtonTitle:@"OK"
                                                 otherButtonTitles:nil];
[alertMessage show];
}

我只是想只用 cancelButtonTitle 显示这个 AlertView,但我在委托附近收到一个错误:self Expected':'

为什么 ?

4

1 回答 1

2
alertMessage = [[UIAlertView alloc] initWithTitle:@"Impossible"
                                              message:[NSString stringWithFormat:@"Here are the problems:\n%@,\n%@,\n%@",self.Error1,self.Error2,self.Error3]
                                             delegate:self
                                             cancelButtonTitle:@"OK"
                                             otherButtonTitles:nil];

试试这个

于 2012-11-08T06:30:26.500 回答