Skip to content

Instantly share code, notes, and snippets.

@moflo
Created January 8, 2011 06:29
Show Gist options
  • Save moflo/770613 to your computer and use it in GitHub Desktop.
Save moflo/770613 to your computer and use it in GitHub Desktop.
dismissView.m
- (void) dismissView {
//! Dismiss the veiw depending on the context, whether from the Signin view or Invitation view
if ([[UserManager sharedUserManager] getUserState] <= kFFUserStateUnregistered) { // was == kFFUserStateFirstTimeUser
fieldforcebetaAppDelegate *myApp = (fieldforcebetaAppDelegate *)[UIApplication sharedApplication].delegate;
myApp.tabBarController.selectedIndex = [myApp getTabIndexForTag:6];
[[NSNotificationCenter defaultCenter] postNotificationName:@"launchSequenceCompleted" object:self userInfo:nil];
}
else {
[self dismissModalViewControllerAnimated:YES];
//[[self navigationController] popToRootViewControllerAnimated:YES];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment