swift - Change a xcode View after a certain time -
hey want make reaction game in xcode swift , have 2 viewcontrollers. first 1 tells player task , second 1 game. want first view segue second 1 after 2 seconds don't know how that... can me?
i use nstimer
. should wait 2 seconds , selector triggered. not @ xcode right can't test it, should work.
var timer = nstimer.scheduledtimerwithtimeinterval(2.0, target: self, selector: "update", userinfo: nil, repeats: false) } func update() { //present view controller }
Comments
Post a Comment