From a21774b390dc62b784079d2e4229a0b3e76dc078 Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Fri, 26 Jul 2019 15:21:01 -0400 Subject: [PATCH] comment & preventing leading text image due to problem. --- MVMCoreUI/Atoms/Views/Label.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MVMCoreUI/Atoms/Views/Label.swift b/MVMCoreUI/Atoms/Views/Label.swift index 0dfd2ba1..0ae93988 100644 --- a/MVMCoreUI/Atoms/Views/Label.swift +++ b/MVMCoreUI/Atoms/Views/Label.swift @@ -406,10 +406,11 @@ public typealias ActionBlock = () -> Void - index: Location within the associated text to insert an external Link Icon - Note: You will need to increment your current index by 2 for any changes to the text after inserting an icon. Each icon insertion adds 2 additional characters to the overall text length. + This implies that you must insert exertal icons in the order they would appear with tappable links. */ public func insertExternalLinkIcon(at index: Int) { - guard let attributedText = attributedText, index <= attributedText.string.count && index >= 0 else { return } + guard let attributedText = attributedText, index <= attributedText.string.count && index > 0 else { return } let mutableString = NSMutableAttributedString(attributedString: attributedText)