2014-04-22 120 views

回答

1

可以容易被你的appDelegate.m

---实现application:didReceiveRemoteNotification:

实例下提到这个功能处理: -

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo 
{ 

    UIApplicationState appState = [application applicationState]; 
    if (appState == UIApplicationStateActive) 
    { 

      UIAlertView *alertVw = [[[UIAlertView alloc] initWithTitle:@"Notify" message:yourMessage delegate:self cancelButtonTitle:@"Done" otherButtonTitles: @"vizllx", nil] autorelease]; 

      [alertVw show]; 
    } 
    else { 
     // Push Notification received while app is in background 
    } 
} 
相关问题