简体   繁体   English

iOS 屏幕中间的标签栏

[英]iOS tab bar in the middle of the screen

I was looking around but cannot find any info how to create a tab bar that will contain 2 controllers in the middle of the screen.我环顾四周,但找不到任何信息如何在屏幕中间创建一个包含 2 个控制器的标签栏。

I write UI for my apps programatically BTW, i don't use storyboards.我以编程方式为我的应用程序编写 UI,我不使用情节提要。

Here is a sample from Vimeo, I want to do something similar.这是来自 Vimeo 的示例,我想做类似的事情。

Vimeo sample Vimeo 示例

As I see on sample - this tab bar is UISegmentedControl element (and it is not UITabBar what can be messing up with the terms).正如我在示例中看到的那样 - 这个标签栏是UISegmentedControl元素(它不是 UITabBar 可能会弄乱这些条款)。 It has delegates methods what allow you to respond to its selection and on these events you can change or show-hide views or controllers included in your ui.它具有允许您响应其选择的委托方法,并且在这些事件上您可以更改或显示隐藏包含在您的 ui 中的视图或控制器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM