UITableViewCell line wrap not working

patcarutherspatcaruthers USMember ✭✭✭

I've got an app with several different subclasses of UITableView.
In all of them i set the cell's Lines=2 and linebreakmode to WordWrap.

On the iPhone 5s it works as expected in all 4 places.
On the iPhone 6s it only works in 1 of the 4.
(and all 4 work on the iPhone 6s simulator).

Both phones are running the latest iOS (9.2.1)
and i'm using the default fonts on both phones.

I've looked at the xib files for the working and non-working tables and the only
difference i see is that the one which always works is a "plain" not "grouped" table,
but i did a quick test switching it to grouped and it still works, so that's not the
difference that matters.

i also tried using Lines=0 and linebreakmode=CharacterWrap
but it made no difference.

anyone have any ideas of what else might be stopping line wrap from happening?


  • patcarutherspatcaruthers USMember ✭✭✭

    some further info -- it looks like GetHeightForRow is not being called for
    some of my tables (the ones that aren't working...)

    Following suggestions on a thread about a similar problem i have made sure that i set
    my tableView.Source first in ViewDidLoad but that hasn't helped.

  • patcarutherspatcaruthers USMember ✭✭✭

    This is disturbing -- the problem has "gone away".

    At one time today i decided to do a "release" build instead of the debug builds
    i had been using and that build had working line wrap. It's been a very long
    time since i have been hit with different behavior between release and
    debug builds, but that's not the same as "never"... So i went back and did
    another debug build to make sure, and yes, you guessed, that started working, too.

    I am reasonably certain that it is important that the tableview controller gets
    it's Source set first thing in the ViewDidLoad method, but beyond that i don't
    know what happened to make this problem go away :(

Sign In or Register to comment.