1
我想在AlertView中显示推送通知消息。iOS推送通知消息
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
NSDictionary *dic = [userInfo objectForKey:@"aps"];
NSString *message = [userInfo objectForKey:@"alert"];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:@"Sie haben eine eine Nachricht." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
}
这就是userInfo
变量包含:
我都试过,但*message
是nil
。
NSString *message = [userInfo objectForKey:@"alert"];
我怎样才能获得"alert"
价值?有任何想法吗?。
在此先感谢。
buahh非常愚蠢的错误...谢谢,对不起我的愚蠢的问题.. – Ale 2014-12-03 12:11:58
不用担心,这是很好的,你花写一个详细的描述的时候:) – user623396 2014-12-03 12:17:50