单军华
2017-07-12 20d1260d26b028897f3c0935c12fc35aa37b2e93
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
//  UIView+RoundedCorner.h
//  UIImageRoundedCornerDemo
//
//  Created by jm on 16/2/25.
//  Copyright © 2016年 Jim. All rights reserved.
//
//使用这个类就可以了
 
#import <UIKit/UIKit.h>
#import "UIImage+RoundedCorner.h"
 
@interface UIView (RoundedCorner)
 
/**给view设置一个圆角边框*/
- (void)jm_setCornerRadius:(CGFloat)radius withBorderColor:(UIColor *)borderColor borderWidth:(CGFloat)borderWidth;
 
/**给view设置一个圆角边框,四个圆角弧度可以不同*/
- (void)jm_setJMRadius:(JMRadius)radius withBorderColor:(UIColor *)borderColor borderWidth:(CGFloat)borderWidth;
 
 
/**给view设置一个圆角背景颜色*/
- (void)jm_setCornerRadius:(CGFloat)radius withBackgroundColor:(UIColor *)backgroundColor;
 
/**给view设置一个圆角背景颜色,四个圆角弧度可以不同*/
- (void)jm_setJMRadius:(JMRadius)radius withBackgroundColor:(UIColor *)backgroundColor;
 
 
/**给view设置一个圆角背景图*/
- (void)jm_setCornerRadius:(CGFloat)radius withImage:(UIImage *)image;
 
///**给view设置一个圆角背景图,四个圆角弧度可以不同*/
- (void)jm_setJMRadius:(JMRadius)radius withImage:(UIImage *)image;
 
 
/**给view设置一个contentMode模式的圆角背景图*/
- (void)jm_setCornerRadius:(CGFloat)radius withImage:(UIImage *)image contentMode:(UIViewContentMode)contentMode;
 
///**给view设置一个contentMode模式的圆角背景图,四个圆角弧度可以不同*/
- (void)jm_setJMRadius:(JMRadius)radius withImage:(UIImage *)image contentMode:(UIViewContentMode)contentMode;
 
 
/**设置所有属性配置出一个圆角背景图*/
- (void)jm_setCornerRadius:(CGFloat)radius withBorderColor:(UIColor *)borderColor borderWidth:(CGFloat)borderWidth backgroundColor:(UIColor *)backgroundColor backgroundImage:(UIImage *)backgroundImage contentMode:(UIViewContentMode)contentMode;
 
/**设置所有属性配置出一个圆角背景图,四个圆角弧度可以不同*/
- (void)jm_setJMRadius:(JMRadius)radius withBorderColor:(UIColor *)borderColor borderWidth:(CGFloat)borderWidth backgroundColor:(UIColor *)backgroundColor backgroundImage:(UIImage *)backgroundImage contentMode:(UIViewContentMode)contentMode;
 
/**设置所有属性配置出一个圆角背景图,并多传递了一个size参数,如果JMRoundedCorner没有拿到view的size,可以调用这个方法*/
- (void)jm_setJMRadius:(JMRadius)radius withBorderColor:(UIColor *)borderColor borderWidth:(CGFloat)borderWidth backgroundColor:(UIColor *)backgroundColor backgroundImage:(UIImage *)backgroundImage contentMode:(UIViewContentMode)contentMode size:(CGSize)size;
 
@end