If i understand the question correctly, you should use:
(UIImage *)resizableImageWithCapInsets:(UIEdgeInsets)capInsets
UIEdgeInsets is structure that specifies float values for each cap inset: top, left, bottom and right areas of an image. To apply this to the image for the button, here is all we need to do:
UIImage *buttonImage = [[UIImage imageNamed:@"blueButton"]
resizableImageWithCapInsets:UIEdgeInsetsMake(0, 16, 0, 16)];
This requests that the left and right 16 pixels of the original image are not scaled or resized when stretching the image to accomodate the button size frame defined above. The end
OBS: This only work well for plain images, for example images with gradient will not work well.
Take a look here for more detail.