美文网首页
A push to B, B中有个alertView 点击ok希

A push to B, B中有个alertView 点击ok希

作者: _哈哈哈哈哈哈 | 来源:发表于2019-07-10 11:26 被阅读0次

B中创建alertView的时候传入参数:B控制器。 

然后

UIAlertController *alertController = [UIAlertController alertControllerWithTitle:nil message:@"Subscribed!" preferredStyle:UIAlertControllerStyleAlert];

    UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {

        [self.vc.navigationController popViewControllerAnimated:YES];

    }];

    [alertControlleraddAction:okAction];

相关文章

网友评论

      本文标题:A push to B, B中有个alertView 点击ok希

      本文链接:https://www.haomeiwen.com/subject/swbckctx.html