mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
Merge pull request #7534 from NativeScript/djenkov/limit-bottom-navigation-items
feat(bottom-navigation-ios): limit bottom to 5 items
This commit is contained in:
@ -21,6 +21,7 @@ export * from "../tab-navigation-base/tab-navigation-base";
|
||||
export * from "../tab-navigation-base/tab-strip";
|
||||
export * from "../tab-navigation-base/tab-strip-item";
|
||||
|
||||
const maxTabsCount = 5;
|
||||
const majorVersion = iosUtils.MajorVersion;
|
||||
const isPhone = device.deviceType === "Phone";
|
||||
|
||||
@ -490,6 +491,9 @@ export class BottomNavigation extends TabNavigationBase {
|
||||
return;
|
||||
}
|
||||
|
||||
// Limit both tabContentItems and tabStripItems to 5 in order to prevent iOS 'more' button
|
||||
items = items.slice(0, maxTabsCount);
|
||||
|
||||
const controllers = NSMutableArray.alloc<UIViewController>().initWithCapacity(length);
|
||||
const states = getTitleAttributesForStates(this);
|
||||
|
||||
|
Reference in New Issue
Block a user