I could not get it wrapping at the right place. It looks like SwiftUI wraps to balance as much as possible to have same length text on both lines. No way to directly ask for a lineBreakMode, unless you go through UIViewRepresentable https://stackoverflow.com/questions/58469001/how-can-i-get-text-to-wrap-in-a-uilabel-via-uiviewrepresentable-without-having/58474880#58474880 . how to vertical align top for text High Tide Declare in the HStack (see below) I tested with a longer text just to check Text(1:08 AM (Tue 03) January and more) Why do you define explicit GeometryProxy var ? How to you call to initialise (in SceneDelegate for instance). I changed as follows to be able to test struct TideForecastInfoView: View { // var geometryProxy: GeometryProxy var body: some View { GeometryReader { geometryProxy in VStack { getHeaders(geometryProxy) TideForecastEntryView() // geometryProxy: geometryProxy) .padding(2) } .background(.white) .clipShape(RoundedRectangle(cornerRadius: 14)) .shadow(radius: 8) } } @ViewBuilder
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: