last day (14 days later) » 

4:03 AM
0
Q: systemLayoutSizeFittingSize does not work on a external Xib cell

user3081516I have been struggling for 2 days with this problem. I have a UIViewController with a UITableView on the storyboard. But I want to reuse the design for a custom cell so I use an Xib file to design the cell. The cells contains a label that gets the content at runtime so the height of it varies....

 
Have you added constraints to the custom cell?
 
I have all the constraints
 
Just curious, Why are you setting up your cell in the heightForRowAtIndexPath delegate method? Also, please post a screenshot of what it looks like.
 
I've just updated the photo
 
What does it look like in the simulator? I'm trying to figure out what your'e trying to accomplish
 
4:03 AM
I've just updated and posted the CellForRowAtIndexPath.
I'll screenshot the simulator right now
simulator screenshot posted: The cells height ended up being the same. In the first cell the text should be multiple lines and the height should be expanded. Instead it truncated at one line
 
So the cell is not the problem. Its the label?
 
I'm not sure
when I layout the cell on the storyboard, everything is fine
the height adjusts
I'm designing a reusable cell so I used an external xib file attach to the PostingTableViewCell class
I think the problem is in the cell
because when I artificially set the heightForRowAtIndexPath at 300
the label does show all the text
i have added the screenshot
 

last day (14 days later) »