diff --git a/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift b/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift index 3f485099..e41115f7 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift @@ -38,7 +38,7 @@ public typealias ActionBlock = () -> () } public var getRange: NSRange { - return NSRange(location: 0, length: text?.count ?? 0) + NSRange(location: 0, length: text?.count ?? 0) } //------------------------------------------------------ @@ -209,7 +209,7 @@ public typealias ActionBlock = () -> () /// Default @objc open class func label() -> Label { - return Label(frame: .zero) + Label(frame: .zero) } //------------------------------------------------------ @@ -794,17 +794,11 @@ extension Label { accessibilityTraits = .staticText } - public func needsToBeConstrained() -> Bool { - return true - } + public func needsToBeConstrained() -> Bool { true } - public func horizontalAlignment() -> UIStackView.Alignment { - return .leading - } + public func horizontalAlignment() -> UIStackView.Alignment { .leading } - public func copyBackgroundColor() -> Bool { - return true - } + public func copyBackgroundColor() -> Bool { true } } // MARK: - Multi-Link Functionality @@ -916,6 +910,7 @@ extension UITapGestureRecognizer { if label.makeWholeViewClickable { return true } + guard let abstractContainer = label.abstractTextContainer() else { return false } let textContainer = abstractContainer.0 let layoutManager = abstractContainer.1 @@ -990,6 +985,7 @@ extension Label { } } } + return false } }