这段代码在iphone上一点问题也没有 ipad上就不行了直接报错
求大神解答啊!!
iPad上AlartSheet是要有一个挂靠位置的
UIPopoverPresentationController *popover = alertController.popoverPresentationController;
if (popover) {
popover.barButtonItem = self.navigationItem.rightBarButtonItem;
}
[self presentViewController:alertController animated:YEScompletion:^{
}];
添加一下这段代码,需要指定一下iPad上popover的展示位置!可以改为sourceView或者sourceRect!
详情参考http://m.shaobozheng.icoc.cc/nd.jsp?id=24&groupId=0
请参考 http://www.jianshu.com/p/83f97b5246ff