-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix orphan (single-word last line) tappability by using line break st…
…rategy (#44) Fixes #42. Fixes tappability of regions relocated to a new line to avoid single-word last lines by UILabel. Xcode 12 (and the iOS 14 SDK) expose `.lineBreakStrategy` which is a new value on `UILabel` and `NSParagraphStyle` to control the orphan avoidance and line break positioning in strings. This new method/enum is backwards compatible as it seems to be formerly-private API made public, so it works on all versions of iOS the label supports as long as you compile using Xcode 12.
- Loading branch information
Showing
2 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters