diff --git a/iphone/Maps/UI/PlacePage/Components/PlacePageHeader/CircleImageButton.swift b/iphone/Maps/UI/PlacePage/Components/PlacePageHeader/CircleImageButton.swift index d89110644..1fafa0309 100644 --- a/iphone/Maps/UI/PlacePage/Components/PlacePageHeader/CircleImageButton.swift +++ b/iphone/Maps/UI/PlacePage/Components/PlacePageHeader/CircleImageButton.swift @@ -1,5 +1,7 @@ final class CircleImageButton: UIButton { + private static let expandedTappableAreaInsets = UIEdgeInsets(top: -5, left: -5, bottom: -5, right: -5) + private let circleImageView = UIImageView() override init(frame: CGRect) { @@ -46,6 +48,11 @@ final class CircleImageButton: UIButton { circleImageView.layer.cornerRadius = circleImageView.bounds.width / 2.0 } + override func point(inside point: CGPoint, with event: UIEvent?) -> Bool { + let expandedBounds = bounds.inset(by: Self.expandedTappableAreaInsets) + return expandedBounds.contains(point) + } + func setImage(_ image: UIImage?) { circleImageView.image = image }