On running this UIButton code.. you it should look like the given image..

In our code you can see that we are stretching the code... actually in the above code we are creating a image that is stretchable to a particular height and width.
The method can be written as ...

// create a custom image that is stretchable. Note that this might return a new instance of a different class
- (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight;