Posts

Post marked as solved
4 Replies
2.3k Views
Hi all,I am very new to iOS coding. I am experimenting a little bit with views in SwiftUI, and every tutorial I am trying, says that by default, there is a safe area to prevent views landing behind for example the notch. But in following code the text "Hello" is landing behind the notch.What is it I am doing wrong?import SwiftUI struct ContentView: View { var body: some View { VStack{ Text("Hello") Spacer() }.padding() } }If I remove .padding() at the end, the "Hello" is shown!I am a little confused! Is it a xcode bug only shown in preview?thx and kind regardsAhmet
Posted
by devjam.
Last updated
.