swift UIAlertController以iPad为中心

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了swift UIAlertController以iPad为中心相关的知识,希望对你有一定的参考价值。

    UIPopoverPresentationController *popPresenter = ac.popoverPresentationController;
    popPresenter.sourceView = self.view;
    popPresenter.sourceRect = CGRectMake(CGRectGetMidX(self.view.bounds), CGRectGetMidY(self.view.bounds),0,0);
    popPresenter.permittedArrowDirections = 0;
let popPresenter = ac.popoverPresentationController
popPresenter?.sourceView = view
popPresenter?.sourceRect = CGRect(x: view.bounds.midX, y: view.bounds.midY, width: 0, height: 0)
popPresenter?.permittedArrowDirections = []

以上是关于swift UIAlertController以iPad为中心的主要内容,如果未能解决你的问题,请参考以下文章

Swift 之自定义 UIAlertController

Swift:自定义 UIAlertController 视图

swift UIAlertController使用 UIAlertController的宽度 为270

如何在 Swift 中旋转 UIAlertController

Swift:UIAlertController 在 while 循环中

Swift 如何获取 UIAlertController 标题高度