Reputation: 708
I'm building an app that is going to require a registration on the initial launch of the app. I'm used to using nibs and presenting those but how would I present this view modally and then dismiss it once the registration is complete.
Also would it be better to just have a view in the storyboard or a separate storyboard (I'm assuming the former.)
Upvotes: 0
Views: 369
Reputation: 6438
You'll need to have a separate view in the storyboard (login or registration view). If user is not logged in, you'll show it:
UIViewController *viewController = [self.storyboard instantiateViewControllerWithIdentifier:@"YourLoginViewIdentifier"];
[viewController setModalPresentationStyle:UIModalPresentationFullScreen];
[self presentViewController:viewController animated:NO completion:nil];
Pretty much the same approach, which you used.
Upvotes: 3