mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
545 B
Swift
21 lines
545 B
Swift
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
|
|
|
import UIKit
|
|
|
|
public var isIPhone5OrSmaller: Bool {
|
|
return (UIScreen.main.bounds.height - 568) < 1
|
|
}
|
|
|
|
public var isIPhone6OrSmaller: Bool {
|
|
return (UIScreen.main.bounds.height - 667) < 1
|
|
}
|
|
|
|
public extension UIDevice {
|
|
var isIPad: Bool {
|
|
let isNativeIPad: Bool = (userInterfaceIdiom == .pad)
|
|
let isCompatabilityModeIPad: Bool = (userInterfaceIdiom == .phone && self.model.hasPrefix("iPad"))
|
|
|
|
return isNativeIPad || isCompatabilityModeIPad
|
|
}
|
|
}
|