NSTimer IOS setting text of layer but text disappears once timer is destroyed -
NSTimer IOS setting text of layer but text disappears once timer is destroyed - i'm using nstimer write text catextlayer text displays split second. i set first timer this: -(void) startsentanceanimation{ float firsttime = [[sentancearray objectatindex:0][@"time"]floatvalue]; [nstimer scheduledtimerwithtimeinterval:firsttime target:self selector:@selector(timedsentances:) userinfo:sentancearray repeats:no]; } it calls method changes text , creates new timer. -(void)timedsentances:(nstimer *)timer{ nsarray *userinfo = timer.userinfo; timer = nil; nsstring *sentance = [userinfo objectatindex:sentancecount][@"sentance"]; [self nextline:sentance]; //textlayer.string = sentance; float intervallength = [[userinfo objectatindex:sentancecount][@"time"]floatvalue]; [nstimer scheduledtimerwithtimeinterval:intervallength target:self selector:@selector(timedsentances:) userinfo:userinfo repeats:no]; sen...