我正在尝试使用输入字段显示UIAlertView for iOS 7设备,所以我有方法
- (void)createAlertView
{
NSString *msg = @"Description (optional)";
UIAlertView *myAlert = [[UIAlertView alloc] initWithTitle:lastMarkAsOutdatedActionTitle
message:msg
delegate:self
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"Confirm", nil];
myAlert.alertViewStyle = UIAlertViewStylePlainTextInput;
[myAlert show];
}
我正在这样打电话
[self performSelectorOnMainThread:@selector(createAlertView) withObject:nil waitUntilDone:NO];
但在第myAlert.alertViewStyle = UIAlertViewStylePlainTextInput;
行我收到错误Thread 1: EXC_BAD_ACCESS (code=1, address=0x18)
我创建了干净的项目并测试了这段代码 - 它的工作原理让我坚持下去。有什么想法吗?
更新 错误时刻的屏幕