To do this for iOS 6, you need to use resizable APIs.
Sort of...
UIImage *normalImage = [UIImage imageNamed:@"myImageWithAStretchyInside"];
UIImage *resizableImage = [normalImage resizableImageWithCapInsets:UIEdgeInsetsMake(10, 5, 10, 5)];
normalImagewill not change correctly. resizableImagewill be.
The order of the insertion edges top, left, bottom, right.
source
share