mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-06 17:28:29 +08:00
feat: ios 26 early look
This commit is contained in:
@ -14,7 +14,7 @@ year="{{displayDate?.year}}"
|
||||
<DatePicker class="v-center text-center" width="{{ showTime ? 220 : 300}}" height="{{ showTime ? 100 : 250}}" minDate="{{minDate}}" maxDate="{{maxDate}}" showTime="{{ showTime }}" iosPreferredDatePickerStyle="{{showTime ? 2 : 1}}" dateChange="{{ dateChange }}" />
|
||||
<GridLayout rows="auto" columns="auto,*">
|
||||
<Switch checked="true" col="0" checkedChange="{{checkedChange}}" />
|
||||
<Label text="Show Time" col="1" class="m-l-10" />
|
||||
<Label text="Show Time" col="1" marginLeft="35" />
|
||||
</GridLayout>
|
||||
<GridLayout rows="auto,auto" columns="">
|
||||
<Label text="Time Picker standalone:" row="0" col="0" class="m-t-10" />
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
<GridLayout class="switch-demo-page">
|
||||
<ScrollView>
|
||||
<StackLayout ios:padding="20" visionos:padding="40">
|
||||
<StackLayout ios:paddingLeft="20" ios:paddingRight="40" visionos:padding="40">
|
||||
|
||||
<GridLayout columns="*, auto" marginTop="24">
|
||||
<Label text="Default + Checked + Enabled" />
|
||||
|
@ -1,17 +1,17 @@
|
||||
<Page>
|
||||
<TabView androidTabsPosition="bottom">
|
||||
<Page backgroundColor="black">
|
||||
<TabView androidTabsPosition="bottom" backgroundColor="black" tabBackgroundColor="black">
|
||||
<TabView.items>
|
||||
<TabViewItem title="First">
|
||||
<TabViewItem title="First" iconSource="res://add_to_fav">
|
||||
<TabViewItem.view>
|
||||
<GridLayout>
|
||||
<Label text="First View" verticalAlignment="center" horizontalAlignment="center"/>
|
||||
<GridLayout backgroundColor="black">
|
||||
<Label text="First Tab" verticalAlignment="center" horizontalAlignment="center" color="white"/>
|
||||
</GridLayout>
|
||||
</TabViewItem.view>
|
||||
</TabViewItem>
|
||||
<TabViewItem title="Second">
|
||||
<TabViewItem title="Second" iconSource="res://add_to_fav">
|
||||
<TabViewItem.view>
|
||||
<GridLayout>
|
||||
<Label text="Second View" verticalAlignment="center" horizontalAlignment="center"/>
|
||||
<GridLayout backgroundColor="black">
|
||||
<Label text="Second Tab" verticalAlignment="center" horizontalAlignment="center" color="white"/>
|
||||
</GridLayout>
|
||||
</TabViewItem.view>
|
||||
</TabViewItem>
|
||||
|
@ -8,13 +8,13 @@ let iconModes = isIOS ? ['automatic', 'alwaysOriginal', 'alwaysTemplate', undefi
|
||||
export const onNavigate = updateButtons;
|
||||
|
||||
export function onChangeRenderingMode(args: EventData) {
|
||||
let tabView = (<Button>args.object).page.getViewById<TabView>('tab-view');
|
||||
if (isIOS) {
|
||||
tabView.iosIconRenderingMode = <'automatic' | 'alwaysOriginal' | 'alwaysTemplate'>iconModes[(iconModes.indexOf(tabView.iosIconRenderingMode) + 1) % iconModes.length];
|
||||
} else {
|
||||
tabView.androidIconRenderingMode = <'alwaysOriginal' | 'alwaysTemplate'>iconModes[(iconModes.indexOf(tabView.androidIconRenderingMode) + 1) % iconModes.length];
|
||||
}
|
||||
updateButtons(args);
|
||||
// let tabView = (<Button>args.object).page.getViewById<TabView>('tab-view');
|
||||
// if (isIOS) {
|
||||
// tabView.iosIconRenderingMode = <'automatic' | 'alwaysOriginal' | 'alwaysTemplate'>iconModes[(iconModes.indexOf(tabView.iosIconRenderingMode) + 1) % iconModes.length];
|
||||
// } else {
|
||||
// tabView.androidIconRenderingMode = <'alwaysOriginal' | 'alwaysTemplate'>iconModes[(iconModes.indexOf(tabView.androidIconRenderingMode) + 1) % iconModes.length];
|
||||
// }
|
||||
// updateButtons(args);
|
||||
}
|
||||
|
||||
function updateButtons(args) {
|
||||
|
@ -189,7 +189,7 @@ function updateTitleAndIconPositions(tabItem: TabViewItem, tabBarItem: UITabBarI
|
||||
if (isIconAboveTitle) {
|
||||
tabBarItem.titlePositionAdjustment = {
|
||||
horizontal: 0,
|
||||
vertical: -20,
|
||||
vertical: -8,
|
||||
};
|
||||
} else {
|
||||
tabBarItem.titlePositionAdjustment = { horizontal: 0, vertical: 0 };
|
||||
@ -199,9 +199,9 @@ function updateTitleAndIconPositions(tabItem: TabViewItem, tabBarItem: UITabBarI
|
||||
if (!tabItem.title) {
|
||||
if (isIconAboveTitle) {
|
||||
tabBarItem.imageInsets = new UIEdgeInsets({
|
||||
top: 6,
|
||||
top: 2,
|
||||
left: 0,
|
||||
bottom: -6,
|
||||
bottom: -2,
|
||||
right: 0,
|
||||
});
|
||||
} else {
|
||||
@ -552,10 +552,10 @@ export class TabView extends TabViewBase {
|
||||
}
|
||||
|
||||
private _updateAppearance(tabBar: UITabBar, appearance: UITabBarAppearance) {
|
||||
tabBar.standardAppearance = appearance;
|
||||
if (SDK_VERSION >= 15) {
|
||||
tabBar.scrollEdgeAppearance = appearance;
|
||||
}
|
||||
// tabBar.standardAppearance = appearance;
|
||||
// if (SDK_VERSION >= 15) {
|
||||
// tabBar.scrollEdgeAppearance = appearance;
|
||||
// }
|
||||
}
|
||||
|
||||
[selectedIndexProperty.setNative](value: number) {
|
||||
|
@ -5,3 +5,4 @@
|
||||
// DEVELOPMENT_TEAM = YOUR_TEAM_ID;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
|
||||
FRAMEWORK_SEARCH_PATHS = $(inherited) $(SDKDIR)/System/Library/SubFrameworks
|
Reference in New Issue
Block a user