Skip to content

Instantly share code, notes, and snippets.

@leepfrog
Created September 19, 2010 08:26
Show Gist options
  • Save leepfrog/586583 to your computer and use it in GitHub Desktop.
Save leepfrog/586583 to your computer and use it in GitHub Desktop.
-(IBAction)presentSalesView:(id)sender {
// We hold on to the salesViewController since we'll be using it a bunch
if (nil == self.salesViewController) {
SCSalesViewController *viewController = [[SCSalesViewController alloc] initWithNibName:@"SCSalesView" bundle:nil];
self.salesViewController = viewController;
[viewController release];
}
[self.navigationController pushViewController:self.salesViewController animated:YES];
}
// Use and trash after i'm done
-(IBAction)presentMySCView {
SCMySalesViewController *mySalesViewController = [[SCMySalesViewController alloc] initWithNibName:@"SCMySalesView" bundle:nil];
[self presentModalViewController:mySalesViewController animated:YES];
[mySalesViewController release];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment