我有问题uialertcontroller。 uialertview完美的作品,但这不会。我有这个:UIAlertController立即执行处理程序
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:LocalizedString(@"Success")
message:LocalizedString(@"Example") preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *actionOk = [UIAlertAction actionWithTitle:LocalizedString(@"Ok")
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action){
[self dismissViewControllerAnimated:YES completion:^
{
[self performSelector:@selector(presentLogInViewController) withObject:nil];
}];
}];
[alertController addAction:actionOk];
[self presentViewController:alertController animated:YES completion:nil];
消息显示两秒钟,立即执行处理程序。我想按下Ok按钮时处理,但不起作用。我究竟做错了什么?
嗯...你是否100%肯定警报的处理程序正在执行,没有按下OK?也许你的代码中有别的东西在执行这些动作... –
是的,我确定。我有AlertView的委托,但我已检查一切。 AlertView的作品,这不是 – Flipper
你确定吗?你做了什么特别的检查? –