如何呈现“启动视图”模态地位于所有其他视图之前?
在我的基于选项卡栏的应用程序中,我需要呈现一个“启动视图”,其扮演类似启动图像的角色。它包含一个显示多个图像的滚动视图。由于它不属于基于主选项卡栏的架构,因此我想以模态方式呈现它。
现在我的问题是在哪里启动它。我在 - (BOOL)application 内的
方法。[self.window makeKeyAndVisible];
之后运行 [self.window.rootViewControllerpresentModalViewController:launchViewControlleranimated:YES];
:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
它可以工作,但主选项卡栏视图将在“启动视图”出现之前不久出现。我需要“启动视图”在所有其他视图之前显示。
In my tabbar based application, I need to present a 'launch view' who plays a role like a launch image. It contains a scroll view which displays several images. As it doesn't belong to the main tabbar based architecture, I'd like to present it modally.
Now my question is where to launch it. I run the [self.window.rootViewController presentModalViewController:launchViewController animated:YES];
after the [self.window makeKeyAndVisible];
inside the - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
method.
It works, but the main tab bar views will appear shortly before the 'launch view' appears. I need the 'launch view' to display before all other views.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以模态方式将其呈现在
根视图控制器中。
也可以在没有动画的情况下显示它 - 它将阻止短时间内显示选项卡栏。
Present it modally in
of your root view controller.
Also present it without animation - it will prevent showing tab bar for a short time.