Working in local push notification if the notification recive its move to NotificationViewcontroller there is no notification it move the main view controller here I'm using code - (void)applicationWillEnterForeground:(UIApplication *)application {
if ([status isEqualToString:@"YES"])
{
NotificationViewcontroller *notify_view =[[NotificationViewcontroller alloc]init];
[self.window.rootViewController presentViewController:notify_view animated:YES completion:nil];
wen in use this code means it should not move to NotificationViewcontroller i got this error whose view is not in the window hierarchy!
// self.window.rootViewController=notify_view;
i use this code it move to NotificationViewcontroller. after see the notification put one back button to go view controller
NSLog(@"Go to some other view");
}
else
{
[self.window.rootViewController dismissViewControllerAnimated:YES completion:nil];
}
After see the notification put one back button to go view controller that back button is not working.
-(IBAction)back_btn:(id)sender { [self.window.rootViewController dismissViewControllerAnimated:YES completion:nil];
} help me!!!! I'm new for development...
Aucun commentaire:
Enregistrer un commentaire