IG
Size: a a a
IG
IG
S
IG
NSCalendar *cal = [NSCalendar currentCalendar];
NSDateComponents *comps = [cal components:(NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay | NSCalendarUnitHour | NSCalendarUnitMinute) fromDate:[NSDate date]];
[comps setHour:0];
[comps setMinute:0];
[comps setSecond:0];
NSDate *midnightOfToday = [cal dateFromComponents:comps];
IG
И
PS
UNUserNotificationCenter
уведомления для него можно показать когда приложение на передненм плане? или только когда свернуто?И
UNUserNotificationCenter
уведомления для него можно показать когда приложение на передненм плане? или только когда свернуто?PS
В
В
PS
В
IG
S
В
В
// The method will be called on the delegate only if the application is in the foreground. If the method is not implemented or the handler is not called in a timely manner then the notification will not be presented. The application can choose to have the notification presented as a sound, badge, alert and/or in the notification list. This decision should be based on whether the information in the notification is otherwise visible to the user.
@available(iOS 10.0, *)
optional func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void)
MS