swiftui padding for different devices code example
Example 1: swiftui padding one line
Text("Hello, World!").padding(EdgeInsets(top: 500, leading: 0, bottom: 0, trailing: 0))
Example 2: SwiftUI padding
Text("Example")
// overall padding
.padding(20)
// left padding
.padding(.leading, 20)
// right padding
.padding(.trailing, 20)
// top padding
.padding(.top, 20)
// bottom padding
.padding(.bottom, 20)