Search code examples
iosuitabbarcontrolleruitabbaruitabbaritem

customize tab bar (need a guidance)


I saw some app have the following tab bar:

enter image description here

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)

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!


Solution

  • This is a UISegmentedControl and not a tab bar.

    Read more about it here 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