viewwillappear not called foreground
===

I have created one library project, and my controllers are present in static library, I want to refresh table when my app will come in foreground. I have maintained the flags for it.
   
    - (void)applicationDidEnterBackground:(UIApplication *)application
    {
        // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current   state in case it is terminated later. 
        // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
        [[NSUserDefaults standardUserDefaults]setValue:@"NO" forKey:@"ApplicationDidBecomeActive"];
        [[NSUserDefaults standardUserDefaults]synchronize];
    }

    - (void)applicationDidBecomeActive:(UIApplication *)application
    {
        // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
        [[NSUserDefaults standardUserDefaults]setValue:@"YES" forKey:@"ApplicationDidBecomeActive"];
        [[NSUserDefaults standardUserDefaults]synchronize];
       // mCheckInAppDelegate.applicationResuming=YES;
    }

But my ViewWillAppear method not get called. This method is in static library's controller and my AppDelegate is in main project so
       
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appIsStarting:) name:UIApplicationDidBecomeActiveNotification object:nil];

this is also not working.