From 927299f4a91c57e96a42b04850d267f793bc46f6 Mon Sep 17 00:00:00 2001 From: Kiryl Kaveryn Date: Fri, 20 Jun 2025 16:50:13 +0400 Subject: [PATCH] [ios] Expand circle buttons tappable area By 5pt to not overlap with another buttons (`close` and `share` on the place page screen) Signed-off-by: Kiryl Kaveryn --- .../Components/PlacePageHeader/CircleImageButton.swift | 7 +++++++ 1 file changed, 7 insertions(+) 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 }