File tree 1 file changed +16
-4
lines changed
1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,10 @@ - (void)setSize:(NSNumber*)size {
20
20
}
21
21
}
22
22
23
+ - (NSNumber *)size {
24
+ return _size;
25
+ }
26
+
23
27
- (void )setType : (NSString *)type
24
28
{
25
29
_type = type;
@@ -29,6 +33,10 @@ - (void)setType:(NSString*)type
29
33
}
30
34
}
31
35
36
+ - (NSString *)type {
37
+ return _type;
38
+ }
39
+
32
40
- (void )setColor : (NSString *)color
33
41
{
34
42
_color = color;
@@ -38,12 +46,16 @@ - (void)setColor:(NSString*)color
38
46
}
39
47
}
40
48
49
+ - (NSString *)color {
50
+ return _color;
51
+ }
52
+
41
53
#pragma mark - Utility
42
54
43
55
- (RTSpinKitViewStyle)getStyleFromString : (NSString *)type
44
56
{
45
57
RTSpinKitViewStyle style = RTSpinKitViewStylePlane;
46
-
58
+
47
59
if ([type isEqual: @" CircleFlip" ])
48
60
style = RTSpinKitViewStyleCircleFlip;
49
61
else if ([type isEqual: @" Bounce" ])
@@ -81,11 +93,11 @@ - (UIColor*)getColorFromString:(NSString*)color
81
93
NSScanner *scanner = [NSScanner scannerWithString: color];
82
94
[scanner setScanLocation: 1 ]; // bypass '#' character
83
95
[scanner scanHexInt: &rgbValue];
84
-
96
+
85
97
if (color.length == @" #00000000" .length ) {
86
98
return [UIColor colorWithRed: ((rgbValue & 0xFF000000 ) >> 24 )/255.0 green: ((rgbValue & 0xFF0000 ) >> 16 )/255.0 blue: ((rgbValue & 0xFF00 ) >> 8 )/255.0 alpha: (rgbValue & 0xFF )/255.0 ];
87
99
}
88
-
100
+
89
101
return [UIColor colorWithRed: ((rgbValue & 0xFF0000 ) >> 16 )/255.0 green: ((rgbValue & 0xFF00 ) >> 8 )/255.0 blue: (rgbValue & 0xFF )/255.0 alpha: 1.0 ];
90
102
}
91
103
@@ -117,4 +129,4 @@ - (void)removeFromSuperview
117
129
[super removeFromSuperview ];
118
130
}
119
131
120
- @end
132
+ @end
You can’t perform that action at this time.
0 commit comments