File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
A small collection of Swift structs to replace #define statements in Obj-C.
4
4
5
- _ v0.5.0 _
5
+ _ v0.5.1 _
6
6
7
7
## Usage
8
8
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ public struct Defines
16
16
public static let isiPad = UIDevice . current. userInterfaceIdiom == . pad
17
17
public static let isiPhone4OrLess = !isiPad && Screen . maxLength < 568.0
18
18
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
21
21
public static let isiPhoneX = !isiPad && Screen . maxLength == 812.0
22
22
#if (arch(i386) || arch(x86_64)) && (os(iOS) || os(watchOS) || os(tvOS))
23
23
public static let isSimulator = true
@@ -38,7 +38,7 @@ public struct Defines
38
38
39
39
public struct App
40
40
{
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
42
42
public static func bundleId( ) -> String {
43
43
return Bundle . main. bundleIdentifier!
44
44
}
You can’t perform that action at this time.
0 commit comments