简体   繁体   English

自定义标签栏(需要指导)

[英]customize tab bar (need a guidance)

I saw some app have the following tab bar: 我看到一些应用程序具有以下标签栏:

在此处输入图片说明

I summarize the above tab bar with following characteristics: 我总结了上面的标签栏,它具有以下特征:

  1. showing on top 在顶部显示
  2. not fully occupy the full screen width 没有完全占据整个屏幕宽度
  3. Inside an navigation controller 导航控制器内部

(I am using xcode8 + swift3) (我正在使用xcode8 + swift3)

I would like to implement the same thing, but I don't know how to do it (I know how to implement default tab bar showing at bottom & occupy full screen width). 我想实现相同的功能,但是我不知道该怎么做(我知道如何实现显示在底部的默认标签栏并占据全屏宽度)。 Could someone please guide me or provide a tutorial link how to implement this thing? 有人可以指导我或提供教程链接如何实现此功能吗? Thanks! 谢谢!

This is a UISegmentedControl and not a tab bar. 这是一个UISegmentedControl,而不是一个标签栏。

Read more about it here https://developer.apple.com/documentation/uikit/uisegmentedcontrol 在这里阅读更多关于它的信息https://developer.apple.com/documentation/uikit/uisegmentedcontrol

Here is a link on how to use it https://www.ioscreator.com/tutorials/segmented-control-tutorial-ios10 这是有关如何使用它的链接https://www.ioscreator.com/tutorials/segmented-control-tutorial-ios10

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

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