在Nativescript角度选项卡视图上隐藏选项卡按钮

在Nativescript角度选项卡视图上隐藏选项卡按钮,nativescript,tabview,nativescript-angular,Nativescript,Tabview,Nativescript Angular,我正试图找到一种方法来删除Angular 6应用程序元素上的选项卡按钮,但到目前为止没有任何效果。基本上,我只想保留选项卡内容及其滑动功能 显然,你可以使用特定的android和iOS方法,但我不确定如何做到这一点 <TabView [(ngModel)]="tabSelectedIndex" (selectedIndexChanged)="onSelectedIndexChanged($event)" (loaded)="tabViewLoaded($event)"> &l

我正试图找到一种方法来删除Angular 6应用程序元素上的选项卡按钮,但到目前为止没有任何效果。基本上,我只想保留选项卡内容及其滑动功能

显然,你可以使用特定的android和iOS方法,但我不确定如何做到这一点

<TabView [(ngModel)]="tabSelectedIndex" (selectedIndexChanged)="onSelectedIndexChanged($event)" (loaded)="tabViewLoaded($event)">
    <ng-container *ngFor="let article of articles" #tabView>
        <StackLayout *tabItem="{title: article.id}">
            <StackLayout>
                <NewsDetails></NewsDetails>
            </StackLayout>
        </StackLayout>
    </ng-container>
</TabView>
但我不知道从现在起该怎么办。有什么想法吗?以前所有关于这方面的问题都没有奏效


下面是一个示例游乐场链接:

将下面的代码与加载的TabView事件一起使用

onTabViewLoaded(event: EventData) {
   const tabView = <TabView>event.object;
   if (isIOS) {
     tabView.viewController.tabBar.hidden = true;
   }
   if (isAndroid) {
     const tabLayout = tabView.nativeViewProtected.tabLayout;
     tabLayout.getLayoutParams().height = 0;
     tabLayout.requestLayout();
   }
}
onTabViewLoaded(事件:EventData){
const tabView=event.object;
国际单项体育联合会(isIOS){
tabView.viewController.tabBar.hidden=true;
}
if(isAndroid){
const tabLayout=tabView.nativeViewProtected.tabLayout;
tabLayout.getLayoutParams().height=0;
tabLayout.requestLayout();
}
}

我最近在

上发布了一个示例作品,我就是这么做的,谢谢!它工作得很好。此外,这是一个非常好看的应用程序!你好,Manoj。
EventData
从哪里来<代码>onTabViewLoaded(事件:EventData)来自加载的事件(
$event
)。
onTabViewLoaded(event: EventData) {
   const tabView = <TabView>event.object;
   if (isIOS) {
     tabView.viewController.tabBar.hidden = true;
   }
   if (isAndroid) {
     const tabLayout = tabView.nativeViewProtected.tabLayout;
     tabLayout.getLayoutParams().height = 0;
     tabLayout.requestLayout();
   }
}