change view when didReceiveRemoteNotification

108 views
Skip to first unread message

mariamar...@gmail.com

unread,
Jun 7, 2013, 12:06:42 PM6/7/13
to apns...@googlegroups.com

Hi,


I am trying to change from the App delegate method to the Master View, in order to perform there a segue but I am getting an NSInvalidArgumentException.


Code in App Delegate when didReceiveRemoteNotification:


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

    

    EmergencyMasterViewController* maincontroller = (EmergencyMasterViewController*)self.window.rootViewController;

    [(EmergencyMasterViewController*)maincontroller alert];

}


Code in MasterView:


-(void)alert

{

    [self performSegueWithIdentifier: @"Warning" sender: self];

}


And the error I am getting[UINavigationController alert]: unrecognized selector


I would appreciate any help,


Cheers.

Reply all
Reply to author
Forward
0 new messages