如何在 iPhone 应用程序启动时显示第二个或第三个标签栏
你好 我创建了一个 iPhone 应用程序。我正在使用 5 个选项卡栏项目。默认情况下,当应用程序启动时,它会显示第一个选项卡栏。我想要做的是在应用程序启动时显示第三个选项卡栏。 我怎样才能做到这一点?
此致, 阿卜杜勒盖维
hi
I've created an iphone app. I am using 5 tab bar items. By default, when app gets launched, it shows up first tabbar. What i want to do is to display 3rd tab bar when application is launched.
How can i do that?
Best regards,
Abdul qavi
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 AppDelegate 的
application didFinishLaunchingWithOptions
方法中,在结束前的某个时间,添加指定的行。请注意,2 是要切换到的选项卡,第一个选项卡从 0 开始。
In the
application didFinishLaunchingWithOptions
method of your AppDelegate, some time before the end, add the indicated line.Note that the 2 is the tab to switch to, starting with 0 for the first tab.
只需将选项卡栏的 selectedItem 属性设置为您想要显示的数字即可。
快乐编码....
just set the selectedItem property of the tabbar to the number you want to show up.
hAPPY iCODING....