您的位置:首页 > 产品设计 > UI/UE

UIAlertController使用的一个坑

2016-06-02 20:50 387 查看
把下面这句话放在block内部”不然会死循环,导致警告控制器不能销毁"
   
UITextField *textField = alertA.textFields.firstObject;

   

UIAlertAction
*ok = [UIAlertAction

actionWithTitle:@"确定"

style:UIAlertActionStyleDefault

handler:^(UIAlertAction
*
_Nonnull
action) {

       

       hero.name
= textField.text;

        [self.tableView

reloadData];

       
//        [self.tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic];
//        [alertA dismissViewControllerAnimated:NO completion:nil];
    }];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: