From 77c45da790f089df786b26d0e55535b3b4fb32a7 Mon Sep 17 00:00:00 2001 From: Martin Yankov Date: Tue, 7 May 2019 13:17:24 +0300 Subject: [PATCH 1/2] fix(ios-tabview): crash when setting tab text color (#7188) --- apps/app/ui-tests-app/tab-view/main-page.ts | 1 + .../ui-tests-app/tab-view/tab-text-color.xml | 24 +++++++++++++++++++ tns-core-modules/ui/tab-view/tab-view.ios.ts | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 apps/app/ui-tests-app/tab-view/tab-text-color.xml diff --git a/apps/app/ui-tests-app/tab-view/main-page.ts b/apps/app/ui-tests-app/tab-view/main-page.ts index 69d4aa857..50f8dca5d 100644 --- a/apps/app/ui-tests-app/tab-view/main-page.ts +++ b/apps/app/ui-tests-app/tab-view/main-page.ts @@ -27,5 +27,6 @@ export function loadExamples() { examples.set("tab-view-tab-text-font-size", "tab-view/tab-view-tab-text-font-size"); examples.set("tab-view-android-swipe", "tab-view/tab-view-android-swipe"); examples.set("tab-view-icon-title-placement", "tab-view/icon-title-placement"); + examples.set("tab-text-color", "tab-view/tab-text-color"); return examples; } diff --git a/apps/app/ui-tests-app/tab-view/tab-text-color.xml b/apps/app/ui-tests-app/tab-view/tab-text-color.xml new file mode 100644 index 000000000..8f851e60d --- /dev/null +++ b/apps/app/ui-tests-app/tab-view/tab-text-color.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/tns-core-modules/ui/tab-view/tab-view.ios.ts b/tns-core-modules/ui/tab-view/tab-view.ios.ts index 3201e9a2c..70f8c1f3d 100644 --- a/tns-core-modules/ui/tab-view/tab-view.ios.ts +++ b/tns-core-modules/ui/tab-view/tab-view.ios.ts @@ -576,7 +576,7 @@ function getTitleAttributesForStates(tabView: TabView): TabStates { } const tabSelectedItemTextColor = tabView.style.selectedTabTextColor; - const selectedTextColor = tabItemTextColor instanceof Color ? tabSelectedItemTextColor.ios : null; + const selectedTextColor = tabSelectedItemTextColor instanceof Color ? tabSelectedItemTextColor.ios : null; result.selectedState = { [NSFontAttributeName]: font } if (selectedTextColor) { result.selectedState[UITextAttributeTextColor] = selectedTextColor From aa44eb950e7239803d2783a2ae33dabba6566e24 Mon Sep 17 00:00:00 2001 From: Vladimir Amiorkov Date: Tue, 7 May 2019 17:09:39 +0300 Subject: [PATCH 2/2] fix(ios-modal): closeCallback not being called with popover presentation style (#7189) --- e2e/modal-navigation/app/home/home-page.ts | 16 ++++++++++- e2e/modal-navigation/app/home/home-page.xml | 1 + .../app/modal-no-page/modal-no-page.ts | 2 +- e2e/modal-navigation/app/modal/modal-page.ts | 2 +- e2e/modal-navigation/package.json | 1 + e2e/modal-navigation/references.d.ts | 1 + tns-core-modules/ui/core/view/view-common.ts | 7 ++++- tns-core-modules/ui/core/view/view.ios.ts | 27 ++++++++++++++++++- 8 files changed, 52 insertions(+), 5 deletions(-) create mode 100644 e2e/modal-navigation/references.d.ts diff --git a/e2e/modal-navigation/app/home/home-page.ts b/e2e/modal-navigation/app/home/home-page.ts index 54cb458fa..1ce7f9179 100644 --- a/e2e/modal-navigation/app/home/home-page.ts +++ b/e2e/modal-navigation/app/home/home-page.ts @@ -1,7 +1,7 @@ import * as application from "tns-core-modules/application"; import { StackLayout } from "tns-core-modules/ui/layouts/stack-layout"; import { NavigatedData, Page } from "tns-core-modules/ui/page"; -import { View, EventData } from "tns-core-modules/ui/core/view"; +import { View, EventData, ShowModalOptions } from "tns-core-modules/ui/core/view"; import { Frame } from "tns-core-modules/ui/frame"; export function onNavigatingTo(args: NavigatedData) { @@ -29,6 +29,20 @@ export function onModalNoPage(args: EventData) { false); } +export function onPopoverModal(args: EventData) { + const view = args.object as View; + let options: ShowModalOptions = { + context: "context", + closeCallback: () => console.log("home-page modal popover frame closed"), + animated: false, + ios: { + presentationStyle: UIModalPresentationStyle.Popover + } + } + + view.showModal("modal-no-page/modal-no-page", options); +} + export function onModalFrame(args: EventData) { const view = args.object as View; diff --git a/e2e/modal-navigation/app/home/home-page.xml b/e2e/modal-navigation/app/home/home-page.xml index 67a6197eb..62bfbc778 100644 --- a/e2e/modal-navigation/app/home/home-page.xml +++ b/e2e/modal-navigation/app/home/home-page.xml @@ -20,6 +20,7 @@