Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions apidoc/Titanium/UI/TabGroup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,19 @@ properties:
default: True if tab group is opened on top of the root activity. False otherwise.
type: Boolean

- name: forceBottomPosition
summary: Force tab bar to bottom position.
description: |
A new floating tab bar was introduced in iPadOS 18.
It is displayed without tab icons and at the top of the screen.
This property forces the tab bar to be displayed in the old style with icons and at the bottom of the screen (as on iPhone).
type: Boolean
default: false
availability: creation
osver: {ios: {min: "18.0"}}
platforms: [ipad]
since: 13.1.0

- name: swipeable
summary: |
Boolean value indicating if tab navigation can be done by swipes, in addition to tab clicks.
Expand Down
8 changes: 8 additions & 0 deletions iphone/Classes/TiUITabGroup.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ - (UITabBarController *)tabController
appearance.backgroundColor = UIColor.clearColor;
controller.tabBar.scrollEdgeAppearance = appearance;
}

// force tab bar to bottom position (as before iPadOS 18 and on iPhone)
if ([TiUtils isIOSVersionOrGreater:@"18.0"] && [TiUtils isIPad]) {
BOOL forceBottomPosition = [TiUtils boolValue:[self.proxy valueForUndefinedKey:@"forceBottomPosition"] def:NO];
if (forceBottomPosition) {
controller.traitOverrides.horizontalSizeClass = UIUserInterfaceSizeClassCompact;
}
}
}
return controller;
}
Expand Down
Loading