-
(UIImage ) resizableImage:(NSString ) imageName {
UIImage image = [UIImage imageNamed:imageName];
// 取图片底部的1 x 1进行拉伸 中部是/2
UIEdgeInsets insets = UIEdgeInsetsMake(image.size.height4/5, image.size.width4/5, image.size.height4/5 + 1, image.size.width*4/5 + 1);return [image resizableImageWithCapInsets:insets];
}
网友评论