1
我需要在用户按buttonIndex 1
后显示确认提醒,但如果我使用popViewcontroller
在clickedButtonAtIndex
它崩溃没有错误。在clickedButtonAtIndex中显示警报?
的问题是,
[self.navigationController popViewControllerAnimated:YES];
之前第二警报单击名为...
如何解决?
这是我的代码:
- (void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == 1) {
UIAlertView *alert =
[[UIAlertView alloc] initWithTitle:@"OK!"
message:@"Completed"
delegate:self
cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
[alert show];
[alert release];
[self.navigationController popViewControllerAnimated:YES];
}
}
我曾把UIAlertView中的一个子类,只是因为人们无法在触摸屏上点击。命名这个代表的这个家伙在地狱里有一个特别的地方。 – 2011-01-27 16:52:11