From your comment it seems you want to call a function on the view controller when the app becomes active?
You can add an observer to your view controller, if the class has an init method that is getting called do it there, if not do it in viewDidLoad:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(appBecameActive)
name: UIApplicationDidBecomeActiveNotification
object:nil];
You need to remove it when the object is removed, so add this:
- (void) dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
Then the method appBecameActive will be called every time the app becomes active
- (void) appBecameActive
{
call your method here
}
P.S. From your comments + is for class methods. Which with a view controller is probably not what you want. Read about class methods versus object methods to continue your iOS education.