我在本机脚本中创建 SegmentedBar。我可以创建细分,但无法将标签添加到细分视图。
<Page xmlns="http://www.nativescript.org/tns.xsd" loaded="pageLoaded">
<StackLayout>
<SegmentedBar>
<SegmentedBar.items>
<SegmentedBarItem title="Segment 1">
<SegmentedBarItem.view>
<Label text=" I am in segment bar 1"/>
</SegmentedBarItem.view>
</SegmentedBarItem>
<SegmentedBarItem title="Segment 2">
<SegmentedBarItem.view>
<Label text=" I am in segment bar 2"/>
</SegmentedBarItem.view>
</SegmentedBarItem>
</SegmentedBar.items>
</SegmentedBar>
</StackLayout>
</Page>
SegmentedBar 和 TabView 之间有什么区别,因为两者看起来相同。