Objective c 应为AlertView错误';:';

Objective c 应为AlertView错误';:';,objective-c,Objective C,我只想用CancelButtontile显示此AlertView,但我在委托附近收到一个错误:self 预期':' 为什么? 试试这个谢谢,很管用!(希望能很快获得积分):@PratyushaTerli这是你的了。第二个nil对他没有帮助。@PratyushaTerli我是stackoverflow的新手,我点击向上箭头给好的答案打分,但我收到一条消息我必须获得15个信誉点,现在我点击这个答案很好,有两个不同的反馈?我有点困惑……:) - (void)showMessageError { ale

我只想用CancelButtontile显示此AlertView,但我在委托附近收到一个错误:self 预期':'

为什么?


试试这个

谢谢,很管用!(希望能很快获得积分):@PratyushaTerli这是你的了。第二个
nil
对他没有帮助。@PratyushaTerli我是stackoverflow的新手,我点击向上箭头给好的答案打分,但我收到一条消息我必须获得15个信誉点,现在我点击这个答案很好,有两个不同的反馈?我有点困惑……:)
- (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];
}
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];