In SwiftUI, How do I increase the height of a button?

You just need to set PlainButtonStyle and draw it as you wish…

Here is for example one of your button:

Button(action: {
    
}) {
    Text("Singleplayer").font(.system(size: geometry.size.width/20))
        .padding()
        .background(RoundedRectangle(cornerRadius: 8).fill(Color.blue))
        .frame(minWidth: geometry.size.width/2)
}
.buttonStyle(PlainButtonStyle())

custom button

Leave a Comment