我正在使用此SWIFT代码当从图中示出用深色(例如黑色)背景的警报显示从UIViewController
UIAlertViewController闪烁/闪烁简要
import UIKit
class TestViewController: UIViewController {
@IBAction func onTestClick(sender: UIButton) {
let alertController = UIAlertController(title: "title", message: "message", preferredStyle: .Alert)
alertController.addAction(UIAlertAction(title: "OK", style: .Default, handler: nil))
self.presentViewController(alertController, animated: true, completion: nil)
}
}
警报对话框中,它简要地“闪烁“(出现白色,然后立即变为比白色稍暗的颜色)。
这似乎没有发生在其他应用程序和系统操作系统上。
这里有什么问题?
是否有任何其他代码与'UIAlertController'演示一起执行?任何视图操作等?如果将背景颜色更改为白色,您是否可以观察到眨眼?不知道颜色如何相关,但我们试着去调查一下。我建议在VC上斩断一些代码,看看这种行为是否仍然存在。 –
@RaphaelOliveira没有其他代码正在执行,如果白色背景没有闪烁。如果不是动画也不会发生。 – Code
嗯,很难猜测。你能粘贴你的视图控制器代码吗? –