2

I need to re-create my current UIViewController in my iOS application on applicationDidBecomeActive. In my code, I adding a lot of runtime graphics to screen, so I think best way to completely recreate it.

I need to solve 2 tasks:

  1. Determine, which UIViewController currently on display (I change view controllers with presentModalViewController command).
  2. Completely repaint it.

Can anybody help me?

Andrey
  • 2,659
  • 4
  • 29
  • 54
  • I think the best answer is in http://stackoverflow.com/questions/3639859/handling-applicationdidbecomeactive Cheers – Kasas Nov 22 '12 at 10:03

1 Answers1

6

may be helpful for u :)

- (void)applicationDidBecomeActive:(UIApplication *)application
{  
   UIViewController* root = _window.rootViewController;
   UINavigationController* navController = (UINavigationController*)root;
   YourViewController * mycontroller = (YourViewController *)[[navController viewControllers] objectAtIndex:0];
   [mycontroller reloadInputViews];
}