Horizontally align with clock on watchOS 10

42 Views Asked by At

I have a full-screen view (ignoresSafeArea) that is part of a vertical TabView in watchOS 10. I have text that I'd like to horizontally align with the clock that appears automatically in the upper right of the display.

I've tried using a toolbar, but it positions well below the clock. I've tried dynamically offsetting the text, but the clock height varies by watch model:

GeometryReader { screen in
    ZStack {
        // Other view content here.
        Text("My text")
            .offset(y: screen.size.height * 0.075)
            .ignoresSafeArea(edges: .top)
    }
}

This view doesn't participate in any navigation other than TabView. The text isn't a header per se, and shouldn't be any larger than the clock font; the standard navigation title size would be too large. It just seems that it would look good visually aligned with the clock. Is trying to align it a bad design idea? If so, what is recommended for text in that area of the screen. Otherwise, how can I achieve the alignment?

0

There are 0 best solutions below