Skip to content

Instantly share code, notes, and snippets.

@JeOam
Created October 21, 2014 06:40
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save JeOam/1e71742c19147da21527 to your computer and use it in GitHub Desktop.
Save JeOam/1e71742c19147da21527 to your computer and use it in GitHub Desktop.
Flipboard FLEX: An in-app debugging and exploration tool for iOS

FLEX (Flipboard Explorer) is a set of in-app debugging and exploration tools for iOS development. When presented, FLEX shows a toolbar that lives in a window above your application. From this toolbar, you can view and modify nearly every piece of state in your running application.

Installation via Cocoapods

pod 'FLEX', '~> 1.1'

Setup in project: AppDelegate.m

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    .....
    [self addFlexTapGestureIfNeed];
    .....
}

#pragma mark -
#pragma mark -------------------- About Tweak & FLEX ---------------------
- (void)addFlexTapGestureIfNeed{
#ifdef DEBUG
    UITapGestureRecognizer *tapGR = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTapFlex:)];
    tapGR.numberOfTapsRequired = 2;
    tapGR.numberOfTouchesRequired = 2;
    [self.window addGestureRecognizer:tapGR];
#endif
}

- (void)didTapFlex:(UITapGestureRecognizer*)tapGR
{
    if (tapGR.state == UIGestureRecognizerStateRecognized) {
#if DEBUG
        [[FLEXManager sharedManager] showExplorer];
#endif
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment