From e8a3df6441e5bb77b87ff9127811f125347d9e15 Mon Sep 17 00:00:00 2001 From: marty-suzuki Date: Sat, 16 Feb 2019 11:40:31 +0900 Subject: [PATCH 1/2] use window?.traitCollection instead of UIApplication.shared.keyWindow?.traitCollection #47 --- MisterFusion/MisterFusion.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MisterFusion/MisterFusion.swift b/MisterFusion/MisterFusion.swift index 3d476d1..50016b0 100644 --- a/MisterFusion/MisterFusion.swift +++ b/MisterFusion/MisterFusion.swift @@ -342,7 +342,7 @@ extension View { let item: _LayoutObject = misterFusion.item ?? self #if os(iOS) || os(tvOS) - let traitCollection = UIApplication.shared.keyWindow?.traitCollection + let traitCollection = window?.traitCollection if let horizontalSizeClass = misterFusion.horizontalSizeClass , horizontalSizeClass != traitCollection?.horizontalSizeClass { return nil From 0bba7b2ab3c84b726ca82936b3b40f75829d3950 Mon Sep 17 00:00:00 2001 From: marty-suzuki Date: Sat, 16 Feb 2019 11:52:32 +0900 Subject: [PATCH 2/2] update podspec --- MisterFusion.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MisterFusion.podspec b/MisterFusion.podspec index 2296d18..10f6d4f 100644 --- a/MisterFusion.podspec +++ b/MisterFusion.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.name = "MisterFusion" - s.version = "4.0.0" + s.version = "4.0.1" s.summary = "MisterFusion makes more easier to use AutoLayout in Swift & Objective-C code."