ios - UIAlertViewController flickers/blinks briefly -
i'm using swift code display alert dialog uiviewcontroller
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) } }
when alert shown view dark (e.g. black) background, briefly "flickers" (appears white , instantly change color darker white).
this doesn't seem happen on other apps , system os.
what's problem here?
i able reproduce saying , don't think doing wrong. if turn slow animations on simulator (cmd + t) see alert controller being positioned in center of screen in fade animation. when animation in progress alert controller has white background (and apple's code, it's fine) , when animation finishes alert controller has transparent background change according colour of view behind it. don't notice when view white because white + white = white! :)
i hope helps.
Comments
Post a Comment