Skip to content

Instantly share code, notes, and snippets.

@eladb
Created March 20, 2014 11:08
Show Gist options
  • Save eladb/9661513 to your computer and use it in GitHub Desktop.
Save eladb/9661513 to your computer and use it in GitHub Desktop.
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
if ([keyPath isEqualToString:@"currentUser"]) {
if (self.currentUser) {
[self hopTo:@"main" then:nil];
}
else {
[self hopTo:@"signup_login" then:nil];
}
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment