iosuilocalnotificationresidemenu

UILocalNotification with Residemenu


How would one get Local notifications working with a Residemenu? The goal is once a local notification is clicked upon that it opens up a specific view controller. This view controller is different to the default root view controller. I'm using storyboards with the library so I am not programmatically setting the root view controller in the AppDelegate. However I release in order to get local notifications to work as described above I have to programmatically change the root view controller in

-(void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification{

I can't find how to do this with RESideMenu.


Solution

  • Add NotificationCenter in you Residemenu Class and when Notification comes then Called it. That reload the view and update sidemenu.

    -(void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification{
           [[NSNotificationCenter defaultCenter] postNotificationName:@"reloadData" object:self];
        }