Apns警报定制

我已经在iPhone应用程序成功使用APNS,并仍然有一个问题的警报customization.Below是我的问题:

1我无法自定义警报视图,如标题和buttontitle.I自定义警报,如:

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { NSDictionary *apsDic = [userInfo valueForKey:@"aps"]; NSString *alertStr = [apsDic valueForKey:@"alert"]; NSNumber *badgeNum = [apsDic valueForKey:@"badge"]; NSString *soundStr = [apsDic valueForKey:@"sound"]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:[arr objectAtIndex:1] message:msg delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:@"view",nil]; [alert show]; [alert release]; } 

在我的应用程序中,提醒的标题是我的应用程序的标题;button标题是“closures”和“查看”。

2当我点击“查看”,显示我的应用程序的启动视图,然后崩溃。为什么?

所以如果系统提供的警报是无法定制的,那么视图动作也在系统的控制之下。 看来1和2之间是矛盾的。

任何帮助表示赞赏! 谢谢

我发现:如果您的应用程序无法启动,apns-alert将由您无法自定义的iOS提供。