Rya*_*ley 6 iphone objective-c ios
我在谈论这个:http: //reviews.cnet.com/8301-19512_7-20120625-233/ios-5-notifications-a-deeper-look/
iOS上的那些下拉菜单,我对生活的热爱找不到任何关于如何发出通知的文档,以便在另一个应用程序中显示更新.我不知道我是在使用错误的术语还是什么,但是它是"NSNotificationCenter",它的文档在哪里?
谢谢 :)
数字徽章不是本地通知的唯一属性.它还可以显示横幅和播放声音.随后将这些横幅添加到通知中心.
这是一个例子:
- (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];
}
Run Code Online (Sandbox Code Playgroud)
这是一个教程:http://www.icodeblog.com/2010/07/29/iphone-programming-tutorial-local-notifications/