On Github 50ButtonsEach / battlehack-presentation
Made with love by Shortcut Labs
Our vision is to become the de-facto bluetooth button for developers on iOS and Android
- (void)viewDidLoad { [super viewDidLoad]; // 1 self.flicManager = [[SCLFlicManager alloc] initWithDelegate:self appID:APP_ID appSecret:APP_SECRET andRestoreState:YES]; } - (IBAction)grab:(id)sender; { // 2 [self.flicManager requestButtonFromFlicAppWithCallback:@"externalflictest://button"]; } - (BOOL)handleOpenURL:(NSURL *)url; { // 3 self.flicButton = [self.flicManager generateButtonFromURL:url]; // 4 self.flicButton.delegate = self; return YES; } - (void) flicButton:(SCLFlicButton *) button didReceiveButtonDown:(BOOL) queued age: (NSInteger) age; { // insert magic }
Code templates @ Github