presentViewController底部弹框适配ipad

        //适配ipad

        if ([alert respondsToSelector:@selector(popoverPresentationController)]) {

            

            alert.popoverPresentationController.sourceView = self.view;

        

            alert.popoverPresentationController.sourceRect = CGRectMake(0, kScreenHeight, kScreenWidth, kScreenHeight);

        }

        

        [self presentViewController:alert animated:YES completion:nil];

        

posted @ 2018-05-05 16:10  不停奔跑的蜗牛  阅读(858)  评论(0编辑  收藏  举报