Hi guys, I want to put some space between the content and the top of the screen… I don’t know where exactly I have to write this command in my code, please help me.
Thank you
Hi guys, I want to put some space between the content and the top of the screen… I don’t know where exactly I have to write this command in my code, please help me.
Thank you
Please explain the context:
If SwiftUI, use Spacer(), like in following example:
struct ChecklistRow: View {
let name: String
var body: some View {
HStack {
Spacer()
Image(systemName: "checkmark")
Text(name)
}
.border(Color.blue)
}
}
if UIKit, use constraints (In interface builder) to position the view relative to safe area. Or create those constraints in viewDidLoad.
But in any case, formulate your question more precisely.