This sets the contentStretch property for the views (this is a UIView property, not just a UIImageView property). However, this property is deprecated from iOS 6, so you should not use it.
Replacement, especially for images, resizableImageWithCapInsets . A common use for this is to create an image with left and right sides (or top and bottom), and with one pixel βmiddleβ that is stretched in appearance. This is common for custom buttons, both because it is flexible for different widths and because it saves some space.
See "Defining a stretchable image" in UIImage docs for more information .
source share