I'm trying to create a rounded button with dynamic height/width. To be perfectly rounded, the corner radius must be equal to half of the button's height. Is there a way to dynamically update the corner radius used by the modifier as the view's bound's are changed?
This is what I have so far for the button's label:
This is what I have so far for the button's label:
Code Block HStack { Image(systemName: "plus") Text("Add") } .padding(.vertical, 5) .padding(.horizontal) .overlay(RoundedRectangle(cornerRadius: 10).stroke(lineWidth: 1))