Skip to content

Commit 198cbb8

Browse files
enable user interaction for images in buttons
1 parent 02030be commit 198cbb8

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Sources/ComponentsKit/Components/Button/SUButton.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ private struct ButtonImageView: UIViewRepresentable {
107107
imageView.image = self.image
108108
imageView.tintColor = self.tintColor
109109
imageView.contentMode = .scaleAspectFit
110+
imageView.isUserInteractionEnabled = true
110111
return imageView
111112
}
112113

Sources/ComponentsKit/Components/Button/UKButton.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ extension UKButton {
251251
imageView.contentMode = .scaleAspectFit
252252
imageView.isHidden = model.isLoading || model.imageSrc.isNil
253253
imageView.tintColor = model.foregroundColor.uiColor
254+
imageView.isUserInteractionEnabled = true
254255
}
255256
}
256257
}

0 commit comments

Comments
 (0)