- 其实xcode中的图片中可以直接设置拉伸 不用使用代码
- 代码设置拉伸位置
UIImage *image = [UIImage imageNamed:@"10"];
UIEdgeInsets insets = UIEdgeInsetsMake(25, 50, 10, 10);
image = [image resizableImageWithCapInsets:insets resizingMode:UIImageResizingModeStretch];
UIImage *image = [UIImage imageNamed:@"10"];
UIEdgeInsets insets = UIEdgeInsetsMake(25, 50, 10, 10);
image = [image resizableImageWithCapInsets:insets resizingMode:UIImageResizingModeStretch];