Since

1.1.10

This class represents the page controller when added to a bottom tab bar. Router navigates UI.TabBarItem.page when the tab bar item is clicked.

Example

import TabBarItem from '@smartface/native/ui/tabbaritem';
import BottomTabBar from '@smartface/native/ui/bottomtabbar';
import Image from '@smartface/native/ui/image';

var myHomeImage = Image.createFromFile("images://home.png");
var myTab = new BottomTabBar();
var myItem = new TabBarItem({
title: "Home",
icon: myHomeImage,
route: 'pages/pgHome'
});
myTab.add('home', myItem);

Hierarchy

Properties

nativeObject: any
ios: any
android: any
title: string

Gets/sets the title of tab item.

Property

Android

Ios

Since

1.1.10

icon: undefined | ViewState<string | IImage<any, MobileOSProps<ImageIOSProps, ImageAndroidProps>>>

Gets/sets the icon of tab item.

Property

Property

Property

Android

Ios

Since

1.1.10

badge: IBadge

Gets badge of tab bar item. Badge that is displayed in the upper-right corner of the item with a surrounding red oval. Badge usage isn't currently supported if this TabBarItem is belongs to TabBarController. For iOS, when tabBarItem icon size is big, default position of badge might be wrong. You should call move function for fix this problem. Badge should not be given in constructor.

Example

page.parentController.tabBar.items[0].badge.text = "5"; //ParentController must be BottomTabbarController
page.parentController.tabBar.items[0].badge.visible = true;

Property

Android

Ios

Since

4.0.1

route: string

Gets/sets the route related to tab item. When an tab bar item is pressed, its route is shown.

Property

Android

Ios

Since

1.1.10

Generated using TypeDoc