Skip to content

Instantly share code, notes, and snippets.

@justincbeck
Created April 2, 2014 17:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justincbeck/9938588 to your computer and use it in GitHub Desktop.
Save justincbeck/9938588 to your computer and use it in GitHub Desktop.
Presenting Modal VC
_assessmentListViewController = [[PMAssessmentListViewController alloc] initWithNibName:@"PMAssessmentListViewController" bundle:[NSBundle mainBundle]];
[_assessmentListViewController setStudent:student];
[_assessmentListViewController setAssessment:[[student classroom] assessment]];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:_assessmentListViewController];
[navController setDelegate:self];
UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithTitle:@"done" style:UIBarButtonItemStylePlain target:self action:@selector(dismissTaskList:)];
[[_assessmentListViewController navigationItem] setLeftBarButtonItem:doneButton];
[self presentViewController:navController animated:YES completion:nil];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment