From 7dcf1279b707e552aa971dd637f6d11d356cdac3 Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Wed, 16 Dec 2020 17:08:50 -0500 Subject: [PATCH] new test flow. improved formatting. --- MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) 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 } }