1

当我试图编译我的代码时;这段代码:

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"You Lost!"
    message:[NSString stringWithFormat:@"You were hit! Try again!"]
    delegate:nil
    cancelButttonTitle:@"Dismiss" otherButtonTitles:nil];
[alert show];

有这个错误:
No Visible @interface for 'UIAlertView' declares the sector

4

1 回答 1

1

http://www.raywenderlich.com/forums/viewtopic.php?t=3312&p=20213

您在 cancelButtonTitle 中有一个额外的 t。应该是cancelButtonTitle。

于 2012-07-26T13:08:43.207 回答