viewwillappear not called foreground
<p>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.</p>

<pre><code>- (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];
}
</code></pre>

<p>But my <code>ViewWillAppea</code>r method not get called. This method is in static library's controller and my AppDelegate is in main project so</p>

<pre><code>[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(appIsStarting:) name:UIApplicationDidBecomeActiveNotification object:nil];
</code></pre>

<p>this is also not working.</p>
