我想从警报创建警报。但它崩溃了。我使用代码来创建警报:
{
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:nil message:inMessage delegate:self cancelButtonTitle:nil otherButtonTitles:@"OK", nil];
[alert show];
}
错误信息是:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSError isEqualToString:]: unrecognized selector sent to instance 0x88b84c0'
看起来 inMessage 已经发布。所以我将 inMessage 更改为 @"test test"。它有效,但出去wait_fences: failed to receive reply:10004003
如何在警报中创建警报?