As you can see, the views are not centered because there is a space for Title (which is empty). How can I use it without title to not preserve space for it?
PS I don't want to add offsets for Text
s.
Here is the code for the first part of the View
:
@State private var selectedHour: Int = 0
private let hours: [Int]
VStack {
Picker("", selection: $selectedHour) {
ForEach(hours, id: \.self) {
Text(String($0))
.font(Font.openSansLight(withSize: 24))
}
}
.pickerStyle(.wheel)
}
Text("h".localized)
.foregroundColor(mode.underlayBackgroundColor.color)
.font(Font.openSansLight(withSize: 24))
}
// second part for minutes, the same way. Both VStack
// and Text's are wrapped into HStack of course.