Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
318701bb3d
commit
14f8c13f3c
@ -128,7 +128,11 @@ struct OrientationChangeModifier: ViewModifier {
|
||||
func body(content: Content) -> some View {
|
||||
content
|
||||
.onReceive(NotificationCenter.default.publisher(for: UIDevice.orientationDidChangeNotification)) { _ in
|
||||
orientation = UIDevice.current.orientation
|
||||
let newOrientation = UIDevice.current.orientation
|
||||
// Don't update on face down orientation to prevent redraw when putting phone down
|
||||
if newOrientation != .faceUp && newOrientation != .faceDown {
|
||||
orientation = newOrientation
|
||||
}
|
||||
}
|
||||
.id(orientation.rawValue) // Force view recreation on orientation change
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ struct TimeDisplayView: View {
|
||||
let fontWeight: Font.Weight
|
||||
let fontDesign: Font.Design
|
||||
let forceHorizontalMode: Bool
|
||||
@State var fontSize: CGFloat = 1000
|
||||
@State var fontSize: CGFloat = 100
|
||||
|
||||
// MARK: - Formatters
|
||||
private static let hour24DF: DateFormatter = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user