That's not ideal if you're trying to build a UI in which each tab has its own navigation stack, but from looking at the source code for the TabView component, it appears that it is how it works: every time a new TabView instance is created, the constructor of TabView replaces the instance of the actionBar on the topmost page object with itself.įor my app I'm going to make sure that the tab bar is only visible on the topmost page, which avoids the above being a problem. That works, but it still means we only have a single ActionBar (iOS Navigation Bar). It syncs the ngModel value to the selectedIndex for the tab, which means we can use the following code to update the ActionBar title property: Gets or sets the label of the tab strip entry.Įmitted when the selectedIndex property is changed.Įmitted when the layout bounds of a view changes due to layout processing.I discovered by looking at the source code of nativescript-angular that there is a SelectedIndexValueAccessor directive which adds support for ngModel to TabView components. Gets or sets the image of the tab strip entry. Supports local image paths ( ~), resource images ( res://) and icon fonts ( font://) Gets or sets the icon source of the tab strip entry. Gets or sets the title of the tab strip entry. Gets or sets an array of strip items of the TabStrip. When set to true the icon will have fixed size following the platform-specific design guidelines. Gets or sets the icon rendering mode on iOS. "automatic", "alwaysOriginal", "alwaysTemplate" Gets or sets the tab strip of the BottomNavigation. Gets or sets the selectedIndex of the BottomNavigation. Gets or sets the items of the BottomNavigation. Properties BottomNavigation Properties Name Note: The number of TabStripItem components must be equal to the number of tabContentItem components. Each TabContentItem acts as a container for your tab content.įont-family: "Font Awesome 5 Free", "fa-solid-900"
0 Comments
Leave a Reply. |