iOS 图片拉伸

UIImage *img = [UIImage imageNamed:@"CGUnwrapRed_2"];

img = [img stretchableImageWithLeftCapWidth:floorf(img.size.width/2.0) topCapHeight:img.size.height/2];

原文地址:https://www.cnblogs.com/wlsxmhz/p/5773112.html