Skip to content

AXTextNode2 when clicked on seeMore sometimes working smooth but sometime flickering #2091

Open
@abbasnaqvi200

Description

if isSeeMore {
        self.sayText.truncationAttributedText = NSAttributedString(string: "...", attributes: SFAttribute.get(Attribute.themeColor, 
        .semiBold, fontSize))
        self.sayText.additionalTruncationMessage = NSAttributedString(string: "See more", attributes: 
        SFAttribute.get(Attribute.themeColor, .semiBold, fontSize))
        self.sayText.maximumNumberOfLines = 2
        
} else {
        self.sayText.maximumNumberOfLines = self.sayText.lineCount
        self.sayText.truncationAttributedText = NSAttributedString(string: " ", attributes: SFAttribute.get(Attribute.themeColor, 
        .semiBold, fontSize))
        self.sayText.additionalTruncationMessage = NSAttributedString(string: "See less", attributes: 
       SFAttribute.get(Attribute.themeColor, .semiBold, fontSize))
    }

self.sayText.attributedText = sayTextAttributedString

//When Clicked on SeemoreButton

func seeMoreClicked(type: String, node: HeaderNode) {
debugPrint("seeMoreClicked")
node.sayText.maximumNumberOfLines = node.sayText.lineCount
node.setNeedsLayout()
}

RecordIt-03EBA96F-A3BC-4998-960C-CCBE18F27BF5.mov

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions