Skip to content

Added truncation line enabled property#704

Open
ivanbruel wants to merge 3 commits into
TTTAttributedLabel:masterfrom
ivanbruel:master
Open

Added truncation line enabled property#704
ivanbruel wants to merge 3 commits into
TTTAttributedLabel:masterfrom
ivanbruel:master

Conversation

@ivanbruel
Copy link
Copy Markdown

I needed a way to provide the behavior as seen below:

simulator screen shot 04 aug 2016 11 32 23

In order to accomplish this, aside from setting the attributedTruncationToken to a custom token Read All, I added a property to TTTAttributedLabel to be able to set a truncation token to occupy the whole last line. The parameter added is truncationLineEnabled.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Aug 4, 2016

Current coverage is 75.75% (diff: 60.00%)

Merging #704 into master will increase coverage by 5.52%

@@             master       #704   diff @@
==========================================
  Files             2          2          
  Lines           944        961    +17   
  Methods         112        141    +29   
  Messages          0          0          
  Branches        225        136    -89   
==========================================
+ Hits            663        728    +65   
- Misses          128        135     +7   
+ Partials        153         98    -55   

Sunburst

Powered by Codecov. Last update 6deb9e4...b960ccd

@ivanbruel
Copy link
Copy Markdown
Author

Adding a range for the Link on a given attributedTruncationString was having issues with hitboxes because the underlying text is not monospaced, as such, it lead to wrong link click detection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants