Skip to content

Commit 8c50560

Browse files
author
Bell App Lab
committed
Bump to v0.5.1
Small fix for native scale
1 parent 6382222 commit 8c50560

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A small collection of Swift structs to replace #define statements in Obj-C.
44

5-
_v0.5.0_
5+
_v0.5.1_
66

77
## Usage
88

Source/Defines.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ public struct Defines
1616
public static let isiPad = UIDevice.current.userInterfaceIdiom == .pad
1717
public static let isiPhone4OrLess = !isiPad && Screen.maxLength < 568.0
1818
public static let isiPhone5orSE = !isiPad && Screen.maxLength == 568.0
19-
public static let isiPhone6or7or8 = !isiPad && Screen.maxLength == 667.0
20-
public static let isiPhone6pOr7por8p = !isiPad && Screen.maxLength == 736.0
19+
public static let isiPhone6AndAbove = !isiPad && Screen.maxLength == 667.0
20+
public static let isiPhonePlus = !isiPad && Screen.maxLength == 736.0
2121
public static let isiPhoneX = !isiPad && Screen.maxLength == 812.0
2222
#if (arch(i386) || arch(x86_64)) && (os(iOS) || os(watchOS) || os(tvOS))
2323
public static let isSimulator = true
@@ -38,7 +38,7 @@ public struct Defines
3838

3939
public struct App
4040
{
41-
public static let isScaledUp = Device.isiPhone6pOr7p && UIScreen.main.nativeScale > UIScreen.main.scale
41+
public static let isScaledUp = (Device.isiPhonePlus || Device.isiPhoneX) && UIScreen.main.nativeScale > UIScreen.main.scale
4242
public static func bundleId() -> String {
4343
return Bundle.main.bundleIdentifier!
4444
}

0 commit comments

Comments
 (0)