Skip to content

Instantly share code, notes, and snippets.

@augusteo
Created November 24, 2014 09:08
Show Gist options
  • Save augusteo/6bd7b9eeff2a531c423f to your computer and use it in GitHub Desktop.
Save augusteo/6bd7b9eeff2a531c423f to your computer and use it in GitHub Desktop.
- (void)applicationWillResignActive:(UIApplication *)application {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
UISplitViewController *splitView = (UISplitViewController*)self.window.rootViewController;
BMJSDetailViewController* controller = nil;
for(id vc in splitView.viewControllers) {
NSLog(@"This is for %@", vc);
if([vc isKindOfClass:[BMJSDetailViewController class]]) {
controller = (BMJSDetailViewController*)vc;
NSLog(@"Current active window: %@ and splitview %@", controller, splitView);
break;
}
}
if(controller != nil){
[controller showJobDetails];
NSLog(@"It worked!");
}
NSLog(@"Current active window: %@ and splitview %@", controller, splitView);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment