让按钮调用 iOS 上的 UITabBar 应用程序

发布于 2024-10-05 13:31:33 字数 141 浏览 6 评论 0原文

我正在制作一个具有 UITabBar 的应用程序,它工作得很好,但是我想添加一个包含一些说明和徽标的第一个屏幕,然后是一个按钮,当按下所述按钮时显示 UITabBar 我已经尝试过我自己做了几天,没有运气,我什至不确定是否可以完成,有人可以帮助我吗?或者给我一个线索?

I am making an application that has a UITabBar and it works just fine, however I want to add a first screen which contains some instructions and a logo, then a button and when said button is pressed to show the UITabBar I've tried for a couple of days to do this on my own with no luck, I'm not even sure if it can be done, could anyone help me out? or give me a lead?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

牵你的手,一向走下去 2024-10-12 13:31:33

尝试设置选项卡栏应用程序,然后将其上的第一个屏幕显示为 modalViewController。在主应用程序的 viewController 内:

FirstViewController *firstViewController = [FirstViewController alloc] initWithNibName:@"FirstView" bundle:nil];
[self presentModalViewController:firstViewController animated:NO];
[firstViewController release];

当在模态视图内按下按钮时,调用:

[[self parentViewController] dismissModalViewControllerAnimated:YES];

以摆脱它。您可以调整解雇的动画样式,或使用 NO 让它消失。

Try setting up the tab bar application, and then showing the first screen over it as a modalViewController. Inside your main app's viewController:

FirstViewController *firstViewController = [FirstViewController alloc] initWithNibName:@"FirstView" bundle:nil];
[self presentModalViewController:firstViewController animated:NO];
[firstViewController release];

When the button is pressed inside the modal view, call:

[[self parentViewController] dismissModalViewControllerAnimated:YES];

to get rid of it. You can adjust the animation style for the dismissal, or use NO instead to have it just disappear.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文