ios - add a delay to my NSTimer after i press start game -
on button start game have few nstimers
make things scroll, want add delay these timers, not sure how though.
any advice?
here's buttons 1 of nstimers
-(ibaction)startgame:(id)sender{ startgame.hidden = yes; backgroundmovement = [nstimer scheduledtimerwithtimeinterval:0.06 target:self selector:@selector(backgroundmoving) userinfo:nil repeats:yes]; }
thank you
when call [nstimer scheduledtimerwithtimeinterval:...]
time interval is delay. called after time interval specify.
alternatively, call performselector:withobject:afterdelay:
.
however, note please there deep flaws in proposed architecture. repeating timer .06
interval terrible idea, , more 1 atrocious idea. need rethink completely. consider using real animation, or display link, or sprite kit. or something. anything, really.
Comments
Post a Comment