TextureGroup / Texture

Smooth asynchronous user interfaces for iOS apps.
https://texturegroup.org/
Other
8.02k stars 1.29k forks source link

ASTextNode properties: isTruncated, additionalTruncationMessage, truncationAttributedText work only on truncationMode = .byWordWrapping #1897

Open lukaszgieraltowski opened 4 years ago

lukaszgieraltowski commented 4 years ago

Hi 👋

I'm using Texture version 3.0.0.

Sample code:

let textNode = ASTextNode()
textNode.maximumNumberOfLines = 1
textNode.truncationMode = .byTruncatingTail
textNode.attributedText = NSAttributedString(string: someLongString)

I'm adding such TextNode to a small container. It's correctly rendered, and truncated, however:

  1. textNode.isTruncated value is false
  2. additionalTruncationMessage is ignored
  3. truncationAttributedText is ignored

After changing .byTruncatingTail to .byWordWrapping everything is fine.

AbhiRathi-iOS commented 3 years ago

@lukaszgieraltowski Were you able to fix this? I'm having a similar problem