Story caption improvements

This commit is contained in:
Ilya Laktyushin
2023-06-20 18:05:20 +04:00
parent 3cb9b21c72
commit 09e2e5bdc2
56 changed files with 2903 additions and 666 deletions

View File

@@ -160,6 +160,6 @@ public extension ContainerViewLayout {
}
var standardInputHeight: CGFloat {
return self.deviceMetrics.keyboardHeight(inLandscape: self.orientation == .landscape) + self.deviceMetrics.predictiveInputHeight(inLandscape: self.orientation == .landscape)
return self.deviceMetrics.standardInputHeight(inLandscape: self.orientation == .landscape)
}
}

View File

@@ -266,7 +266,7 @@ public enum DeviceMetrics: CaseIterable, Equatable {
return 20.0
}
}
public func keyboardHeight(inLandscape: Bool) -> CGFloat {
if inLandscape {
switch self {
@@ -337,6 +337,10 @@ public enum DeviceMetrics: CaseIterable, Equatable {
}
}
public func standardInputHeight(inLandscape: Bool) -> CGFloat {
return self.keyboardHeight(inLandscape: inLandscape) + predictiveInputHeight(inLandscape: inLandscape)
}
public var hasTopNotch: Bool {
switch self {
case .iPhoneX, .iPhoneXSMax, .iPhoneXr, .iPhone12Mini, .iPhone12, .iPhone12ProMax: