vds_ios/VDS/Extensions/UITapGestureRecognizer.swift
Matt Bruce 8b37986b40 reverted back to original MVA code for getting the location of links and such.
refactored

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
2024-06-21 13:19:15 -05:00

23 lines
618 B
Swift

//
// UITapGesture.swift
// VDS
//
// Created by Matt Bruce on 8/4/22.
//
import Foundation
import UIKit
extension UITapGestureRecognizer {
/// Determines if the touch event has a action attribute within the range given
/// - Parameters:
/// - label: Label in question
/// - targetRange: Range to look within
/// - Returns: Wether the range in the label has an action
public func didTapActionInLabel(_ label: Label, inRange targetRange: NSRange) -> Bool {
let tapLocation = location(in: label)
return label.isAction(for: tapLocation, inRange: targetRange)
}
}