YFShrinkImage is a category of UIImage which shrink partial of image.
博客园记录: 【IOS】详解图片局部拉伸 + 实现图片局部收缩
#import "UIImage+YFShrink.h"
UIImage *originImage = [UIImage imageNamed:@"wechat"]; //200 * 78
UIImage *shrinkImage = [originImage shrinkImageWithCapInsets:UIEdgeInsetsMake(30, 40, 30, 60) actualSize:CGSizeMake(150, 60)];
shrinkButton = [[UIButton alloc] initWithFrame:CGRectMake(20, 320, 150, 60)];
[shrinkButton setBackgroundImage:shrinkImage forState:UIControlStateNormal];
[self.view addSubview:shrinkButton];