Skip to content

Instantly share code, notes, and snippets.

@jontelang
Created July 13, 2014 19:52
Show Gist options
  • Save jontelang/b9d9611adac0b65e4987 to your computer and use it in GitHub Desktop.
Save jontelang/b9d9611adac0b65e4987 to your computer and use it in GitHub Desktop.
asd
- (void)activator:(LAActivator *)activator receiveEvent:(LAEvent *)event
{
if( self.hidden )
{
labelReferences = [[NSMutableDictionary alloc] init];
[self makeKeyAndVisible];
[self setAlpha:0];
[self buildToggles]; // Contains animations
ANIMATE(0.35f,0.0f) [self setAlpha:1]; AND STOP
[event setHandled:YES];
}
else
{ // TODO
// I'm adding this because apparently without it
// the view wont dimiss if opened on the lockscreen
[self removeToggles];
[event setHandled:YES];
}
}
- (void)activator:(LAActivator *)activator receiveDeactivateEvent:(LAEvent *)event
{
if( !self.hidden )
{
[self removeToggles];
[event setHandled:YES];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment