第一个应用程序启动时显示特定故事板/视图

时间:2013-08-22 20:43:53

标签: iphone ios storyboard viewcontroller

我正在构建一个应用程序,该应用程序需要在应用程序的首次启动时进行注册。我习惯使用笔尖并呈现这些,但是如何以模态方式呈现此视图,然后在注册完成后将其解除。

最好只在故事板或单独的故事板中有一个视图(我假设前者。)

1 个答案:

答案 0 :(得分:3)

您需要在故事板(登录或注册视图)中拥有单独的视图。如果用户未登录,您将显示它:

UIViewController *viewController = [self.storyboard instantiateViewControllerWithIdentifier:@"YourLoginViewIdentifier"];
[viewController setModalPresentationStyle:UIModalPresentationFullScreen];
[self presentViewController:viewController animated:NO completion:nil];

您使用的方法几乎相同。

相关问题