Can I set UILocalnotification to repeat every last day of every month?

I want to try it myself, but it will take me a month before I can do it. Has anyone tried this?

NSDate *fireDate = // Date I want to repeat, in this case 31 may 

localNotification.fireDate = fireDate;
localNotification.repeatInterval = NSMonthCalendarUnit;
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];

I expected him to warn on the last day of every month. Is that the way? And if I plan it for a 30-day month, and the next day - a 31-day month, for example, April → May. What should I do, because I can only install it on April 30 (also 28 and 29-day problems).

+3
source share
1 answer

UILocalNotification . , , 31 repeatInterval NSMonthCalendarUnit,

+5

All Articles