Since

3.2

BottomTabbarController is used for navigating between tab bar items with given tags.

Example

import Page from '@smartface/native/ui/page';
import BottomTabbarController from '@smartface/native/ui/bottomtabbarcontroller';

var bottomTabBarController = new BottomTabBarController();
bottomTabBarController.childControllers = [page1, page2, navigationController1, navigationController2];
bottomTabBarController.selectedIndex = 2;

bottomTabBarController.shouldSelectByIndex = function (e){return true || false}
bottomTabBarController.didSelectByIndex = function (e){}

See

BottomTabBarRouter

Hierarchy

Properties

nativeObject: any
childControllers: IController<any>[]

Gets/sets child controllers of BottomTabbarController instance.

Property

Android

Ios

Since

3.2.0

Gets/sets tab bar view of BottomTabbarController instance.

Property

Android

Ios

Since

3.2.0

selectedIndex: number

Gets/sets the selected tab bar item.

Property

selectedIndex

Android

Ios

Since

3.2.0

transitionViews?: IView<"touch" | "touchCancelled" | "touchEnded" | "touchMoved", { [key: string]: any }, MobileOSProps<ViewIOSProps, ViewAndroidProps>>[]
pageID: number
popupBackNavigator: any
popUpBackPage?: any
isActive: boolean
parentController: null | IController<any>
headerBar?: HeaderBar

Events

  • Return true if you want the item to be displayed as the selected index.

    shouldSelectByIndex

    Returns

    Boolean

    Android

    Ios

    Since

    3.2.0

    Example

    import BottomTabbarController from '@smartface/native/ui/bottomtabbarcontroller';

    const bottomTabbarController = new BottomTabbarController();
    bottomTabbarController.shouldSelectByIndex = ({ index }) => {
    console.info('shouldSelectByIndex', index);
    return true;
    }

    Parameters

    • params: { index: number }
      • index: number

    Returns boolean

  • Called when an item in the bottom tabbar item is selected.

    didSelectByIndex

    Android

    Ios

    Since

    3.2.0

    Example

    import BottomTabBarController from "./bottomtabbarcontroller";

    const bottomTabBarController = new BottomTabBarController();
    bottomTabbarController.didSelectByIndex = ({ index }) => {
    console.info('didSelectByIndex', index);
    }

    Parameters

    • params: { index: number }
      • index: number

    Returns void

Methods

  • Parameters

    • Optional params: { controller: IController<any>; animated: any; isComingFromPresent?: boolean; onCompleteCallback?: (() => void) }
      • controller: IController<any>
      • animated: any
      • Optional isComingFromPresent?: boolean
      • Optional onCompleteCallback?: (() => void)
          • (): void
          • Returns void

    Returns void

Generated using TypeDoc