Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 30th, 2012  |  syntax: None  |  size: 0.50 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. remove push notification once it is accepted by user
  2. - (void)application:(UIApplication *)application
  3.       didReceiveRemoteNotification:(NSDictionary *)userInfo
  4.        
  5. [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
  6. [[UIApplication sharedApplication] cancelAllLocalNotifications];
  7.        
  8. [[UIApplication sharedApplication] setApplicationIconBadgeNumber:1];
  9.   [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
  10.   [[UIApplication sharedApplication] cancelAllLocalNotifications];