可拉伸图片模板创建方法

+ (UIImage *)resizableImage:(NSString *)name{
  
    UIImage *normal = [UIImage imageNamed:name];
    CGFloat w = normal.size.width * 0.5;
    CGFloat h = normal.size.height * 0.7;
    return [normal resizableImageWithCapInsets:UIEdgeInsetsMake(h, w, h, w)];
    
}

你可能感兴趣的:(可拉伸图片模板创建方法)