|
@@ -62,10 +62,9 @@ func tabBarTotalHeight() -> CGFloat {
|
|
|
func safeTabBarHeight() -> CGFloat {
|
|
|
return isIphoneX() ? 34.0 : 0.0
|
|
|
}
|
|
|
-///是不是.iPhoneX,.iPhoneXr,.iPhoneXs,.iPhoneXsMax
|
|
|
+///是不是.iPhoneX系列
|
|
|
private func isIphoneX() -> Bool {
|
|
|
-
|
|
|
- let groupOfAllowedDevices: [Device] = [.iPhoneX,.iPhoneXR,.iPhoneXS,.iPhoneXSMax,.simulator(.iPhoneX),.simulator(.iPhoneXR),.simulator(.iPhoneXS),.simulator(.iPhoneXSMax)]
|
|
|
+ let groupOfAllowedDevices: [Device] = (Device.allXSeriesDevices + Device.allSimulatorXSeriesDevices)
|
|
|
let device = Device.current
|
|
|
if device.isOneOf(groupOfAllowedDevices) {
|
|
|
return true
|