Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How could I create a custom tabbar similar to this

How could I create this custom tabbar and what does it consist of?

enter image description here

like image 637
conspicatus Avatar asked Jun 25 '11 20:06

conspicatus


People also ask

How do I create a custom TabBar in react native?

Add icons to the tab bar To add icons to each tab, first import the Icon component from react-native-vector-icons library inside the navigation/TabNavigator/index. js file. For this example, let's use AntDesign based icons. // after other import statements import Icon from 'react-native-vector-icons/AntDesign';

How do I create a custom tab bar in Swift?

To add a Tab Bar Controller to the Storyboard, select the 4 placeholders that we just created and the View Controller. Then, go to Editor, select Embed in and Tab Bar Controller. This will envelop all those scenes in a single Tab Bar Controller. Put the new Tab Bar Controller on top of the other controllers.

How do I create a TabBar in SwiftUI?

Press Cmd+N to create a new SwiftUI View, calling it “MainView”. Creating tabs is as easy as putting different views inside an instance of TabView , but in order to add an image and text to the tab bar item of each view we need to use the tabItem() modifier.


2 Answers

On cocoacontrols.com you can find several TabBar implementations similar to this.

like image 126
vikingosegundo Avatar answered Oct 07 '22 15:10

vikingosegundo


iOS 5 now allows to change the background image of the tabbar but this kind of custom control is much more complex. You would basically need to write your own view and controller that would change between views, move the arrow accordingly and activate/deactivate the buttons.

As of the elements it consists of, i would say

  • One background image used for every element
  • The different icons in normal and selected state
  • A UILabel for every element
  • The blue divider
  • The arrow, separate from the divider to simplify the animations...

To see how a tabbar with an indicator could be coded check out this project on GitHub for a Twitter-like tabbar.

like image 22
Iñigo Beitia Avatar answered Oct 07 '22 15:10

Iñigo Beitia