我正在使用此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
嗯,很難猜測。你能粘貼你的視圖控制器代碼嗎? –