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 }}" />
|
<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,*">
|
<GridLayout rows="auto" columns="auto,*">
|
||||||
<Switch checked="true" col="0" checkedChange="{{checkedChange}}" />
|
<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>
|
||||||
<GridLayout rows="auto,auto" columns="">
|
<GridLayout rows="auto,auto" columns="">
|
||||||
<Label text="Time Picker standalone:" row="0" col="0" class="m-t-10" />
|
<Label text="Time Picker standalone:" row="0" col="0" class="m-t-10" />
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<GridLayout class="switch-demo-page">
|
<GridLayout class="switch-demo-page">
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
<StackLayout ios:padding="20" visionos:padding="40">
|
<StackLayout ios:paddingLeft="20" ios:paddingRight="40" visionos:padding="40">
|
||||||
|
|
||||||
<GridLayout columns="*, auto" marginTop="24">
|
<GridLayout columns="*, auto" marginTop="24">
|
||||||
<Label text="Default + Checked + Enabled" />
|
<Label text="Default + Checked + Enabled" />
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
<Page>
|
<Page backgroundColor="black">
|
||||||
<TabView androidTabsPosition="bottom">
|
<TabView androidTabsPosition="bottom" backgroundColor="black" tabBackgroundColor="black">
|
||||||
<TabView.items>
|
<TabView.items>
|
||||||
<TabViewItem title="First">
|
<TabViewItem title="First" iconSource="res://add_to_fav">
|
||||||
<TabViewItem.view>
|
<TabViewItem.view>
|
||||||
<GridLayout>
|
<GridLayout backgroundColor="black">
|
||||||
<Label text="First View" verticalAlignment="center" horizontalAlignment="center"/>
|
<Label text="First Tab" verticalAlignment="center" horizontalAlignment="center" color="white"/>
|
||||||
</GridLayout>
|
</GridLayout>
|
||||||
</TabViewItem.view>
|
</TabViewItem.view>
|
||||||
</TabViewItem>
|
</TabViewItem>
|
||||||
<TabViewItem title="Second">
|
<TabViewItem title="Second" iconSource="res://add_to_fav">
|
||||||
<TabViewItem.view>
|
<TabViewItem.view>
|
||||||
<GridLayout>
|
<GridLayout backgroundColor="black">
|
||||||
<Label text="Second View" verticalAlignment="center" horizontalAlignment="center"/>
|
<Label text="Second Tab" verticalAlignment="center" horizontalAlignment="center" color="white"/>
|
||||||
</GridLayout>
|
</GridLayout>
|
||||||
</TabViewItem.view>
|
</TabViewItem.view>
|
||||||
</TabViewItem>
|
</TabViewItem>
|
||||||
|
@ -8,13 +8,13 @@ let iconModes = isIOS ? ['automatic', 'alwaysOriginal', 'alwaysTemplate', undefi
|
|||||||
export const onNavigate = updateButtons;
|
export const onNavigate = updateButtons;
|
||||||
|
|
||||||
export function onChangeRenderingMode(args: EventData) {
|
export function onChangeRenderingMode(args: EventData) {
|
||||||
let tabView = (<Button>args.object).page.getViewById<TabView>('tab-view');
|
// let tabView = (<Button>args.object).page.getViewById<TabView>('tab-view');
|
||||||
if (isIOS) {
|
// if (isIOS) {
|
||||||
tabView.iosIconRenderingMode = <'automatic' | 'alwaysOriginal' | 'alwaysTemplate'>iconModes[(iconModes.indexOf(tabView.iosIconRenderingMode) + 1) % iconModes.length];
|
// tabView.iosIconRenderingMode = <'automatic' | 'alwaysOriginal' | 'alwaysTemplate'>iconModes[(iconModes.indexOf(tabView.iosIconRenderingMode) + 1) % iconModes.length];
|
||||||
} else {
|
// } else {
|
||||||
tabView.androidIconRenderingMode = <'alwaysOriginal' | 'alwaysTemplate'>iconModes[(iconModes.indexOf(tabView.androidIconRenderingMode) + 1) % iconModes.length];
|
// tabView.androidIconRenderingMode = <'alwaysOriginal' | 'alwaysTemplate'>iconModes[(iconModes.indexOf(tabView.androidIconRenderingMode) + 1) % iconModes.length];
|
||||||
}
|
// }
|
||||||
updateButtons(args);
|
// updateButtons(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateButtons(args) {
|
function updateButtons(args) {
|
||||||
|
@ -189,7 +189,7 @@ function updateTitleAndIconPositions(tabItem: TabViewItem, tabBarItem: UITabBarI
|
|||||||
if (isIconAboveTitle) {
|
if (isIconAboveTitle) {
|
||||||
tabBarItem.titlePositionAdjustment = {
|
tabBarItem.titlePositionAdjustment = {
|
||||||
horizontal: 0,
|
horizontal: 0,
|
||||||
vertical: -20,
|
vertical: -8,
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
tabBarItem.titlePositionAdjustment = { horizontal: 0, vertical: 0 };
|
tabBarItem.titlePositionAdjustment = { horizontal: 0, vertical: 0 };
|
||||||
@ -199,9 +199,9 @@ function updateTitleAndIconPositions(tabItem: TabViewItem, tabBarItem: UITabBarI
|
|||||||
if (!tabItem.title) {
|
if (!tabItem.title) {
|
||||||
if (isIconAboveTitle) {
|
if (isIconAboveTitle) {
|
||||||
tabBarItem.imageInsets = new UIEdgeInsets({
|
tabBarItem.imageInsets = new UIEdgeInsets({
|
||||||
top: 6,
|
top: 2,
|
||||||
left: 0,
|
left: 0,
|
||||||
bottom: -6,
|
bottom: -2,
|
||||||
right: 0,
|
right: 0,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -552,10 +552,10 @@ export class TabView extends TabViewBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _updateAppearance(tabBar: UITabBar, appearance: UITabBarAppearance) {
|
private _updateAppearance(tabBar: UITabBar, appearance: UITabBarAppearance) {
|
||||||
tabBar.standardAppearance = appearance;
|
// tabBar.standardAppearance = appearance;
|
||||||
if (SDK_VERSION >= 15) {
|
// if (SDK_VERSION >= 15) {
|
||||||
tabBar.scrollEdgeAppearance = appearance;
|
// tabBar.scrollEdgeAppearance = appearance;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
[selectedIndexProperty.setNative](value: number) {
|
[selectedIndexProperty.setNative](value: number) {
|
||||||
|
@ -5,3 +5,4 @@
|
|||||||
// DEVELOPMENT_TEAM = YOUR_TEAM_ID;
|
// DEVELOPMENT_TEAM = YOUR_TEAM_ID;
|
||||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
|
||||||
|
FRAMEWORK_SEARCH_PATHS = $(inherited) $(SDKDIR)/System/Library/SubFrameworks
|
Reference in New Issue
Block a user