The content mode property of a view tells how its content should be laid out. In the Interface Builder, the various modes can be selected in the Attributes Inspector.

http://i.stack.imgur.com/fw1Jr.png

Let’s use two image views to see how the various modes work.

http://i.stack.imgur.com/2JlOV.png

Scale to Fill

http://i.stack.imgur.com/5Tm3J.png

The image heights and widths are stretched to match the size of the UIImageView.

Aspect Fit

http://i.stack.imgur.com/faHeK.png

The longest side (either height or width) of the image is stretched to match the view. This makes the image as big as possible while still showing the entire image and not distorting the height or width. (I set the UIImageView background to blue so that its size is clear.)

Aspect Fill

http://i.stack.imgur.com/Vo96g.png

The shortest side (either height or width) of the image is stretched to match the view. Like “Aspect Fit”, the proportions of the image are not distorted from their original aspect ratio.

Redraw

http://i.stack.imgur.com/EIwpr.png

Redraw is only for custom views that need to do their own scaling and resizing. We aren’t using a custom view, so we shouldn’t use Redraw. Notice that here UIImageView just gives us the same result as Scale to Fill, but it is doing more work behind the scenes.

About Redraw, the Apple documentation says:

Content modes are good for recycling the contents of your view, but you can also set the content mode to the UIViewContentModeRedraw value when you specifically want your custom views to redraw themselves during scaling and resizing operations. Setting your view’s content mode to this value forces the system to call your view’s drawRect: method in response to geometry changes. In general, you should avoid using this value whenever possible, and you should certainly not use it with the standard system views.

Center

http://i.stack.imgur.com/v2ewe.png