Skip to content

Commit 5815246

Browse files
committed
feat(bottom-navigation-ios): limit to 5 items
1 parent 12fdb82 commit 5815246

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎tns-core-modules/ui/bottom-navigation/bottom-navigation.ios.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export * from "../tab-navigation-base/tab-navigation-base";
2121
export * from "../tab-navigation-base/tab-strip";
2222
export * from "../tab-navigation-base/tab-strip-item";
2323

24+
const maxTabsCount = 5;
2425
const majorVersion = iosUtils.MajorVersion;
2526
const isPhone = device.deviceType === "Phone";
2627

@@ -490,6 +491,9 @@ export class BottomNavigation extends TabNavigationBase {
490491
return;
491492
}
492493

494+
// Limit both tabContentItems and tabStripItems to 5 in order to prevent iOS 'more' button
495+
items = items.slice(0, maxTabsCount);
496+
493497
const controllers = NSMutableArray.alloc<UIViewController>().initWithCapacity(length);
494498
const states = getTitleAttributesForStates(this);
495499

0 commit comments

Comments
 (0)