Ami*_*hel 4 iphone objective-c uilocalnotification ios5
我有一个使用本地通知的应用程序.现在当IOS5出来并显示通知警报时 - 它会进入通知中心,现在通过我的2个按钮显示警报(显示和取消).
有人可以帮我看看,所以我可以让它弹出屏幕而不是通知中心(屏幕顶部的行).
这是我的代码:
UILocalNotification *localNotif = [[UILocalNotification alloc] init];
localNotif.fireDate=[NSDate date];
localNotif.timeZone = [NSTimeZone defaultTimeZone];
localNotif.alertBody = @"Application alerted";
localNotif.alertAction = @"Show";
localNotif.soundName = UILocalNotificationDefaultSoundName;
localNotif.applicationIconBadgeNumber = 0;
[[UIApplication sharedApplication]presentLocalNotificationNow:localNotif];
[localNotif release];
Run Code Online (Sandbox Code Playgroud)
谢谢,阿米尔.
| 归档时间: |
|
| 查看次数: |
3549 次 |
| 最近记录: |