Skip to content

Instantly share code, notes, and snippets.

@eladb
Created February 27, 2014 13:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eladb/14a266980a6b6ff438fa to your computer and use it in GitHub Desktop.
Save eladb/14a266980a6b6ff438fa to your computer and use it in GitHub Desktop.
// include a `UIViewController` category to easily access the parent hopping view controller
// from any view controller using `self.hoppingViewController` (similarily to `navigationController` method).
// If there's no hopping view controller parent, it no-ops.
#include <CLHoppingViewController.h>
@implementation MySplashViewController
- (void)viewDidLoad
{
[super viewDidLoad];
[self startActivityIndicator];
[self loadStuffWithCompletion:^{
// now that we are done, we want to signal the hopping view controller
[self.hoppingViewController unhop];
}];
}
@end
@implementation MyOnboardingViewController
// called when user hits the 'i am done with onboarding' button
- (IBAction)onboardingFinished:(id)sender
{
[self.hoppingViewController unhop];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment