Saturday, November 21, 2026
HomeiOS Developmentios - Duplication of textual content when Truncate Tail chosen

ios – Duplication of textual content when Truncate Tail chosen

[ad_1]

I’m seeing textual content duplication in my desk cells. My cell permits for 4 strains of textual content to be displayed and if there’s extra it truncates the tail.

The problem happens when there’s greater than 3 strains of textual content with none line breaks.

I at present have “Truncate Tail” chosen in Xcode. If I modify it to “Phrase Wrap” then there isn’t any textual content duplication, nonetheless, I would like the Elipsis (…) to be proven in addition to have phrase wrap.

Right here is the one snippet of code in reference to the subtitle cell. Beneath I connected a pair pics. 1) The cells with Phrase Wrap chosen. 2) The cells with Truncate Tail chosen. 3) The supply of the textual content within the cell.

if adjustedNotes == "" {
        cell.subtitleLabel.textual content = "(dateString)n"
    } else if adjustedNotes == "add notes" {
        cell.subtitleLabel.textual content = "(dateString)n"
    } else {
        cell.subtitleLabel.textual content = "(dateString)n(adjustedNotes)"
    }

Cell with Word Wrap selected

Cell with Truncate Tail selected

Full text that is in the cell

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments