Thanks for the post. When you use a custom label: closure containing only an Image, SwiftUI sizes the button exactly to the intrinsic bounds of that image. If the image is small, like a standard SF Symbol, the minimum tap target size of 44x44. You can explicitly define a minimum frame for the image. However, when you expand the frame of an image, the empty space around it might not register taps. To fix this, apply .contentShape(Rectangle()) to tell SwiftUI that the entire bounding box should be interactive. In place code using your code above without using Xcode. Button { print(Button 3 tapped) } label: { Image(systemName: 3.square.fill) .frame(minWidth: 44, minHeight: 44) .contentShape(Rectangle()) } Albert
Worldwide Developer Relations.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: