UITableViewCells' labels with different heights alter labels' widths?

This is a bit of a guess, but it looks to me like it is the imageView on the left hand side of the cell. Seems like as the cell gets taller, it gets wider (trying to maintain aspect ratio? ) and this is pushing your text to the right.

What's odd is you image is not stretched. Might be worthwhile looking at what is happening to that image view during layoutSubviews If your custom cell does not implement this method, maybe the base class' implementation is doing something you don't expect. You could override it and NSLog to the frame of the image view before and after the a call to super layoutSubviews to see whats going on.

This is a bit of a guess, but it looks to me like it is the imageView on the left hand side of the cell. Seems like as the cell gets taller, it gets wider (trying to maintain aspect ratio? ) and this is pushing your text to the right.

What's odd is you image is not stretched. Might be worthwhile looking at what is happening to that image view during layoutSubviews. If your custom cell does not implement this method, maybe the base class' implementation is doing something you don't expect.

You could override it and NSLog to the frame of the image view before and after the a call to super layoutSubviews to see whats going on.

Good call, let me play around with that, thanks. – rob5408 May 14 at 23:27 I set the background of the cell to gray to see better what was going on. Looking more into the cell's layoutSubviews led me to the answer.

The textLabel was shrinking it's frame to the width needed for the text and then "floating" right. I couldn't figure out what property to change on the cell to make it "float" left so instead I manually set the frame's origin's x to 0. – rob5408 May 15 at 21:41.

It's hard to tell without seeing how you generate your table cells. Do you use a nib for your cells? I've found it much easier to use a nib for custom table cells, so try that if you aren't already.

I suspect you may have a problem with your autoresizeMask on one or more of your table cells' subviews.

That probably would help, please see above. Thanks! Rob – rob5408 May 12 at 20:45.

This is a bit of a guess, but it looks to me like it is the imageView on the left hand side of the cell. Seems like as the cell gets taller, it gets wider (trying to maintain aspect ratio?) and this is pushing your text to the right. What's odd is you image is not stretched.

Might be worthwhile looking at what is happening to that image view during layoutSubviews . If your custom cell does not implement this method, maybe the base class' implementation is doing something you don't expect. You could override it and NSLog to the frame of the image view before and after the a call to super layoutSubviews to see whats going on.

It's hard to tell without seeing how you generate your table cells. Do you use a nib for your cells? I've found it much easier to use a nib for custom table cells, so try that if you aren't already.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions