Created
June 22, 2012 12:17
-
-
Save anonymous/2972414 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //rootViewController.h | |
| //showLoginScreen function | |
| PupilsViewControllerV2Pupils *pupil_selection = [[PupilsViewControllerV2Pupils alloc] init]; | |
| [pupil_selection setDelegate:self]; //makes the rootviewcontroller (self) listen for response from PupilsViewControllerV2Pupils | |
| ... //setup your UIViewController (PupilsViewControllerV2Pupils) here | |
| //create UINavigationController to hold the loginView | |
| UINavigationController *selection_controller = [[UINavigationController alloc] initWithRootViewController:pupil_selection]; | |
| //only want to call this if its an iPad... if its iPhone we let it use the standard appearance what takes the whole screen | |
| if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { | |
| [selection_controller setModalPresentationStyle:UIModalPresentationFormSheet]; | |
| [selection_controller setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal]; | |
| } | |
| //present the view | |
| [self presentModalViewController:selection_controller animated:YES]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment