Naresh Reddy M Naresh Reddy M - 1 month ago 15
Objective-C Question

How to fire a uilocalnotification after three days?

I am currently working on an iPhone project.
I wanted to fire a local notification after three days of time since the time now.

Can anyone help me to achieve this?

Thanks in advance.

Answer
NSInteger nDays = 3;
NStimeInterval nTi = (60*60*24*nDays);
localNotification.fireDate = [NSDate dateWithTimeIntervalSinceNow:nTi];
// Some other code to fire local notification.

This might be helpful.

Thanks, janu.

Comments