iOS如何加载拉伸的图片呢? 1.通过代码指定拉伸区域加载图片 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 + (UIImage*)stretchImage:(NSString *)imageName { UIImage *image = [UIImage imageNamed:imageName]; if ([image respondsToSelector:@selector(resizableImageWithCapInsets:)]) { CGSize imageSize = image.size; image = [image resizableImageWithCapInsets:UIEdgeInsetsMake(imageSize.height/2, imageSize.width/2, imageSize.height/2,