Max
Max

Reputation: 326

React Native TabBarIOS.Item Center icon

I'm trying to make a React Native application which has a TabBar on its iOS side. I don't want any title to button (like "Blue Tab" and "History") and I would like to center vertically the Person icon on the right.

TabBarIOS

Currently I'm using the code available in the example

Upvotes: 0

Views: 579

Answers (2)

Vikky
Vikky

Reputation: 770

To align vertically you can set (flex: 1,) flexDirection: 'row' in styles. Here is an article which helped me with aligning with flexbox in react-native, hope it will help you too :) http://moduscreate.com/aligning-children-using-flexbox-in-react-native/

Upvotes: 1

Max
Max

Reputation: 326

Okay I've just found how to do it :

In the TabBarIOS.Item props I removed :

title:"User"

And I just had to set the title as empty :

title=""

lol

Upvotes: 5

Related Questions