@nativescript/core
Version:
A JavaScript library providing an easy to use api for interacting with iOS and Android platform APIs.
81 lines (80 loc) • 4.25 kB
TypeScript
import { Font } from '../styling/font';
import { View } from '../core/view';
import { ViewBase } from '../core/view-base';
import { TabViewBase, TabViewItemBase, itemsProperty, selectedIndexProperty, tabTextColorProperty, tabTextFontSizeProperty, tabBackgroundColorProperty, selectedTabTextColorProperty, iosIconRenderingModeProperty, iosBottomAccessoryProperty, iosTabBarMinimizeBehaviorProperty } from './tab-view-common';
import { Color } from '../../color';
import { fontInternalProperty } from '../styling/style-properties';
import { textTransformProperty } from '../text-base';
import { CoreTypes } from '../../core-types';
export * from './tab-view-common';
declare class UITabBarControllerImpl extends UITabBarController {
private _owner;
static initWithOwner(owner: WeakRef<TabView>): UITabBarControllerImpl;
viewDidLoad(): void;
viewWillAppear(animated: boolean): void;
viewDidDisappear(animated: boolean): void;
viewWillTransitionToSizeWithTransitionCoordinator(size: CGSize, coordinator: UIViewControllerTransitionCoordinator): void;
traitCollectionDidChange(previousTraitCollection: UITraitCollection): void;
}
export declare class TabViewItem extends TabViewItemBase {
[textTransformProperty.setNative]: (value: CoreTypes.TextTransformType) => void;
private __controller;
setViewController(controller: UIViewController, nativeView: UIView): void;
disposeNativeView(): void;
loadView(view: ViewBase): void;
_update(): void;
_updateTitleAndIconPositions(): void;
}
export declare class TabView extends TabViewBase {
[selectedIndexProperty.setNative]: (value: number) => void;
[itemsProperty.getDefault]: () => TabViewItem[];
[itemsProperty.setNative]: (value: TabViewItem[]) => void;
[tabTextFontSizeProperty.getDefault]: () => number;
[tabTextFontSizeProperty.setNative]: (value: number | {
nativeSize: number;
}) => void;
[tabTextColorProperty.getDefault]: () => UIColor;
[tabTextColorProperty.setNative]: (value: UIColor | Color) => void;
[tabBackgroundColorProperty.getDefault]: () => UIColor;
[tabBackgroundColorProperty.setNative]: (value: UIColor | Color) => void;
[selectedTabTextColorProperty.getDefault]: () => UIColor;
[selectedTabTextColorProperty.setNative]: (value: UIColor) => void;
[fontInternalProperty.getDefault]: () => Font;
[fontInternalProperty.setNative]: (value: Font) => void;
[iosIconRenderingModeProperty.getDefault]: () => "automatic" | "alwaysOriginal" | "alwaysTemplate";
[iosIconRenderingModeProperty.setNative]: (value: "automatic" | "alwaysOriginal" | "alwaysTemplate") => void;
[iosBottomAccessoryProperty.getDefault]: () => View;
[iosBottomAccessoryProperty.setNative]: (value: View) => void;
[iosTabBarMinimizeBehaviorProperty.getDefault]: () => "automatic" | "never" | "onScrollDown" | "onScrollUp";
[iosTabBarMinimizeBehaviorProperty.setNative]: (value: "automatic" | "never" | "onScrollDown" | "onScrollUp") => void;
viewController: UITabBarControllerImpl;
items: TabViewItem[];
private _delegate;
private _moreNavigationControllerDelegate;
private _iconsCache;
private _bottomAccessoryNsView;
private _ios;
private _actionBarHiddenByTabView;
constructor();
createNativeView(): UIView;
initNativeView(): void;
disposeNativeView(): void;
onLoaded(): void;
onUnloaded(): void;
get ios(): UITabBarController;
layoutNativeView(left: number, top: number, right: number, bottom: number): void;
_setNativeViewFrame(nativeView: UIView, frame: CGRect): void;
onSelectedIndexChanged(oldIndex: number, newIndex: number): void;
onMeasure(widthMeasureSpec: number, heightMeasureSpec: number): void;
_onViewControllerShown(tabBarController: UITabBarController, viewController: UIViewController): void;
_handleTwoNavigationBars(backToMoreWillBeVisible: boolean): void;
private getViewController;
private setViewControllers;
private _getIconRenderingMode;
_getIcon(item: TabViewItem): UIImage;
private _updateIOSTabBarColorsAndFonts;
private updateBarItemAppearance;
private _getAppearance;
private _updateAppearance;
private _applyBottomAccessory;
}