如何在 UIAlertController 上添加 UIView

Roh*_*_RK 2 uialertview ios uialertcontroller

我们如何可以像在 UIAlertViewUIViewUIAlertController一样添加on ,@"AccessoryView"但现在它在 iOS 8 中已弃用。所以我想用它,UIAlertController但是怎么用呢?

Nil*_*tel 5

试试下面的东西,

var alert = UIAlertController(title: title, message: message, preferredStyle: UIAlertControllerStyle.ActionSheet);
alert.view.addSubview([YOUR CUSTOMR VIEW]);
Run Code Online (Sandbox Code Playgroud)

希望它有帮助..