From d0d368bd459e2fa2e4d987de36434e5258246a9e Mon Sep 17 00:00:00 2001 From: cruisediary Date: Sat, 21 Jan 2017 23:49:59 +0900 Subject: [PATCH 1/3] feat: use static device size --- Sources/DeviceLayoutConstraint.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Sources/DeviceLayoutConstraint.swift b/Sources/DeviceLayoutConstraint.swift index 02f2ec8..c201086 100644 --- a/Sources/DeviceLayoutConstraint.swift +++ b/Sources/DeviceLayoutConstraint.swift @@ -28,7 +28,7 @@ class DeviceLayoutConstraint: NSLayoutConstraint { } open func deviceSize() -> Size { - return Device.size() + return Device.deviceSize } open func layoutIfNeeded() { @@ -36,3 +36,7 @@ class DeviceLayoutConstraint: NSLayoutConstraint { self.secondItem?.layoutIfNeeded() } } + +fileprivate extension Device { + static let deviceSize = Device.size() +} From 7c7f71b31091c1019f49541f6bb510371b103d5d Mon Sep 17 00:00:00 2001 From: cruisediary Date: Sat, 21 Jan 2017 23:50:28 +0900 Subject: [PATCH 2/3] fix: example 12.9 Inch Device Box View Position --- Example/DeviceLayout/Base.lproj/Main.storyboard | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Example/DeviceLayout/Base.lproj/Main.storyboard b/Example/DeviceLayout/Base.lproj/Main.storyboard index 0401a10..7f97ab0 100644 --- a/Example/DeviceLayout/Base.lproj/Main.storyboard +++ b/Example/DeviceLayout/Base.lproj/Main.storyboard @@ -173,7 +173,7 @@ - + From fd97ff72db7942b1b2d54fa88a2a84f758a7e28d Mon Sep 17 00:00:00 2001 From: cruisediary Date: Sat, 21 Jan 2017 23:54:58 +0900 Subject: [PATCH 3/3] chore: update podspec --- DeviceLayout.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DeviceLayout.podspec b/DeviceLayout.podspec index d315b69..ade8436 100644 --- a/DeviceLayout.podspec +++ b/DeviceLayout.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'DeviceLayout' - s.version = '0.1.1' + s.version = '0.1.2' s.summary = 'Auto Layout can be set differently for each device.' # This description is used to generate tags and improve search results.