Releases: zacwest/ZSWTappableLabel
Releases · zacwest/ZSWTappableLabel
Add Swift Package Manager support
Fix an iOS 12 regression
- Fixes a regression in 3.3 which caused a crash on iOS 12. Turns out that availability flag for lineBreakStrategy only works on iOS 13+!
Fix a couple bugs
- Fixes tappability of regions relocated to a new line to avoid single-word last lines by UILabel. This requires compiling using Xcode 12, but works backwards-compatibly.
- Fixes accessibility elements sometimes exposing more than 1 element per tappable span.
Fix accessibility activation in some cases
- Fixes handling accessibility element activation that spans multiple lines.
Fix accessibility elements, add accessibilityLabel override
- Adds accessibilityDelegate method to override accessibilityLabel of constituent elements.
- Fixes accessibility elements not resetting when text changed.
Improved accessibility, 3D Touch support
- Updates touch handling, improving the long-press experience and adding support for 3D Touch.
- Introduces an accessibility delegate, to provide actions for links within the label.
- Adds the ability to get attributes at a point, particularly for use with 3D Touch.
- Updated examples for Xcode 10.2 and Swift 5 (the pod itself did not need updates).
- Fixes long press delegate call not being invoked unless there was a foreground or background highlight state.
- Fixes not handling
adjustsFontForContentSizeCategory
. Note that you do need to specify aNSFontAttributeName
attribute for this to work, even on vanillaUILabel
, when you are setting attributedText. - Now requires iOS 10 or later, specifically for
-[UIAccessibilityElement accessibilityFrameInContainerSpace]
.
Xcode 9 support
Updated to support Xcode 9 and Swift 4.
Small bug fix
- Fixes some cases where the last line in a label, when sized to fit, would not be tappable on iOS 10.
Long-press support
- Long press support: set a longPressDelegate (like tapDelegate) and be notified when the user long-presses.
Swift and Interface Builder happiness
- Adds annotations for nullability and generics to ease Swift import.
- Fixes a couple Interface Builder issues:
- Flag the delegate as an IBOutlet so it can be assigned.
- Fix text being cleared/unset if only set via the IB editor.
- Fixes text alignments other than left set on the label rather than via NSParagraphStyle.
- Fixes VoiceOver element positions when placed inside a UIScrollView.