.padding( )
// horizontal default spacing
.padding([.horizontal])
// ๐view.padding(top, leading, bottom, trailing)
extension View {
public func padding(
_ top: CGFloat,
_ leading: CGFloat,
_ bottom: CGFloat,
_ trailing: CGFloat
) -> some View {
self.padding(EdgeInsets(top: top, leading: leading, bottom: bottom, trailing: trailing))
}
}
Last updated