我试图在应用程序仍在运行时收到推送通知后更改视图。我试图在AppDelegate.miPhone - 应用程序仍在运行,接收推送通知=更改视图
-(void)application:(UIApplication *)application didRecieveNotification:(NSDictionary *)userInfo
{
TestClass *aTestClassViewController = [[TestClass alloc]initWithNibName:@"TestClass" bundle:nil];
[self presentModalViewController:aTestClassViewController animated:YES];
[aTestClassViewController release];
}
使用它。但是它没有工作。我甚至无法再启动应用程序。所以我猜这是错误的做法。
任何想法的家伙?我会很感激。