Friday, 6 April 2012

how to create simple notification without creating event...

UILocalNotification *localNotif = [[UILocalNotification alloc] init];
    localNotif.fireDate = startDate; //[NSDate dateWithTimeIntervalSinceNow:15];
    localNotif.timeZone = [NSTimeZone localTimeZone];
    localNotif.alertBody = [NSString stringWithFormat:@"%@'s Birthday",strName];
    localNotif.alertAction = @"View";
    localNotif.soundName = UILocalNotificationDefaultSoundName;
    //    localNotif.applicationIconBadgeNumber = 1;
    localNotif.repeatInterval = NSYearCalendarUnit;
   
    [[UIApplication sharedApplication] scheduleLocalNotification:localNotif];

No comments:

Post a Comment