【发布时间】:2015-10-03 21:25:48
【问题描述】:
我正在编辑一个应用,我在其中添加了一个新的 UIViewController 以在一个布局中配置多人游戏。
我为每个玩家添加了两个按钮(顶部按钮、机器人按钮)。每个按钮都会在屏幕上生成一个警报(记住它是横向的),但问题是,玩家 2 没有看到旋转的警报,我的意思是,警报应该以他的方向显示在我面前。
有没有办法做到这一点?我想为玩家旋转一个Alert 2 不会看到Alert 翻转的信息。
这是我的警报代码:
@IBAction func ShowAlert(){
let message = "Test"
let alert = UIAlertController(title: title, message: message, preferredStyle: .Alert)
let action = UIAlertAction(title: "OK", style: .Default, handler: nil)
alert.addAction(action)
presentViewController(alert, animated: true, completion: nil)
}
【问题讨论】:
标签: ios swift rotation uialertcontroller