How to repeate NSTimer every day at particular time in iOS app -
How to repeate NSTimer every day at particular time in iOS app -
i have method phone call sqlite method info , display count application badge number in ip. want method should called every day @ 12.5 has new count day. doing in next way:
[nstimer scheduledtimerwithtimeinterval:300 target:self selector:@selector(makenotificationrequest:) userinfo:nil repeats:yes];
i calling nstimer
in when application goes in background state.
-(void)makenotificationrequest:(nstimer *)timer { [self repeatedmethod]; } - (void)repeatedmethod { sowobject *object =[[sowobject alloc]init]; [object getbadgenumber:[self getdbpath]]; [uiapplication sharedapplication].applicationiconbadgenumber=badgearray.count; }
ios nstimer uilocalnotification badge
Comments
Post a Comment