swiftui image button code example
Example 1: button image not working swiftui
var body: some View {
Button(action: {
print("button pressed")
}) {
Image("marker")
.renderingMode(.original)
}
}
Example 2: swift add image to button
myButton.setImage(UIImage(named: "myImage"), forState: .normal)