IOS 5 "Notification Center"?

I am talking about this: http://reviews.cnet.com/8301-19512_7-20120625-233/ios-5-notifications-a-deeper-look/

These drop-down menus on iOS, for the love of life, I canโ€™t find any documentation on how to make a notification so that it shows the update in another application. I donโ€™t know if I use the wrong terminology or what, but is it an "NSNotificationCenter" and where is any documentation?

Thanks:)

+6
source share
2 answers

A digital icon is not the only property of local notification. It can also display banners and play sounds. These banners are subsequently added to the notification center.

Here is an example:

- (void)addNotification { UILocalNotification *localNotification = [[UILocalNotification alloc] init];  localNotification.fireDate = self.datePicker.date; localNotification.alertBody = self.messageField.text; localNotification.soundName = UILocalNotificationDefaultSoundName; localNotification.applicationIconBadgeNumber = 1;  NSDictionary *infoDict = [NSDictionary dictionaryWithObjectsAndKeys:@"Object 1", @"Key 1", @"Object 2", @"Key 2", nil]; localNotification.userInfo = infoDict;  [[UIApplication sharedApplication] scheduleLocalNotification:localNotification]; [localNotification release]; } 

And here is the tutorial: http://www.icodeblog.com/2010/07/29/iphone-programming-tutorial-local-notifications/

+5
source

Source: https://habr.com/ru/post/924212/


All Articles