I'm stumble on two problems. I'm trying to cnstruct a view which will contain elements placed on full display of the watch (from top to bottom, full-screen). Some watch apps has such views.
Code below shows how to move content to the top+left edge of the display. And there are two problems.
var body: some View {
ZStack(alignment: .topTrailing) {
Rectangle().foregroundColor(Color.green)
HStack(spacing: 0) {
VStack(alignment: .trailing, spacing: 0) {
Text("Hello World")
.padding(.trailing, 20)
Text("Hello World")
Text("Hello World")
}
}
}.edgesIgnoringSafeArea(.all)
.navigationBarHidden(true)
}
As you can see, element Text aligned to the top+trailing with little padding.
By default on the top of display Navigation Bar with Timer are displayed. Modificator '.navigationBarHidden(true)' working and properly hides Navigation Bar, but not a Timer. This is the first problem.
I can't post the image yet.
Second problem: Two warnings are displaying in console while running the app on simulator. And i'm not sure of its meanings. Despite of the warnings simulator is is not crushed.
WatchKit Extension libMobileGestalt utility.c:421: no value found for key 1129072723
WatchKit Extension [default] has no material, defaulting to light aluminum.
My appretiations in advance.