Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Utils/Utils/LayoutHelper/LayoutHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,13 @@ public class LayoutHelper: NSLayoutConstraint {
}
}

@IBInspectable public var isIPad: CGFloat = 0.0 {
didSet {
guard UIDevice.isPad else {
return
}
constant = isIPad
}
}

}
4 changes: 4 additions & 0 deletions Utils/Utils/UIDevice/UIDevice.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ public extension UIDevice {
static var isPad: Bool {
let padSizes: [Size] = [
.screen7_9Inch,
.screen8_3Inch,
.screen9_7Inch,
.screen10_2Inch,
.screen10_5Inch,
.screen10_9Inch,
.screen11Inch,
.screen12_9Inch
]
return padSizes.contains(Device.size())
Expand Down