UIImage+ERCategory.h 557 B

12345678910111213141516171819
  1. //
  2. // UIImage+ERCategory.h
  3. // ErHuDemo
  4. //
  5. // Created by 胡广宇 on 2017/7/11.
  6. // Copyright © 2017年 胡广宇. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @interface UIImage (ERCategory)
  10. //通过颜色生成一张图片
  11. + (UIImage *)imageWithColor:(UIColor *)color size:(CGSize)size;
  12. //给图片切割圆角
  13. + (UIImage *)setCornerWithImage:(UIImage *)image cornerRadius:(CGFloat)cornerRadius;
  14. //根据颜色生成一张带圆角的图片
  15. + (UIImage *)imageWithColor:(UIColor *)color size:(CGSize)size cornerRadius:(CGFloat)cornerRadius;
  16. @end