connor connor - 1 year ago 44
iOS Question

uitableviewcell content shifting after selection

I have a tableview where each cell has an image to the left of a label and detail label like so:

enter image description here

It renders just like that as it is supposed to when the tableview first loads, but if I click the cell to navigate to a different view then return to the table view the image shifts to cover part of the label like this:

enter image description here

The change happens about a second after the tableview appears and it only happens to the cell that was previously selected. Does anyone have any idea what is causing this?

Thanks for the help

Answer Source

This may not be the best answer, but it's what worked for me. Eventually I just deleted all of the subviews in the cell and readding them. It now works fine without having to mess with constraints. I'm not sure what the cause of the problem was.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download