views:

146

answers:

0

I have an image that I would like to display in a UITableViewCell using the UITableViewCellStyleSubtitle style that provides a UIImageView, and two lines of text, plus an optional accessory view.

However, when I set the content mode of the UIImageView to either of UIViewContentModeScaleAspectFit or UIViewContentModeScaleAspectFill, it appears to make no difference. Both of these content modes simply display the entire image, shifting the text to the right to make room for the image.

Does anyone have any examples of how these actually differ in practice? The docs say:

UIViewContentModeScaleAspectFit: Scales the content to fit the size of the view by maintaining the aspect ratio. Any remaining area of the view’s bounds is transparent.

UIViewContentModeScaleAspectFill: Scales the content to fill the size of the view. Some portion of the content may be clipped to fill the view’s bounds.

But these content modes don't appear to be behaving as advertised.

EDIT: I'm running SDK iOS 4.