Skip to content

Commit c9c96f5

Browse files
committed
add 3.0.1 version
1 parent 9d7dd52 commit c9c96f5

File tree

7 files changed

+20
-7
lines changed

7 files changed

+20
-7
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ YAUIKit
44
YAUIKit is a UIKit extension library,
55

66
##Usage
7-
====
87
###Install
98

109
Use [cocoapods-depend](https://github.com/candyan/cocoapods-depend) plugin:
@@ -20,7 +19,6 @@ Next, import the header file wherever your want to use it.
2019
#import <YAUIKit/YAUIKit.h>
2120

2221
##Feature
23-
====
2422

2523
###UIColor Extension
2624

@@ -34,5 +32,6 @@ color mixing
3432
UIColor *redColor = [UIColor redColor];
3533
UIColor *maskColor = [UIColor colorWithHex:0x80000000];
3634
UIColor *mixingColor = [redColor colorByAddingColor:maskColor]; // red color with a 50% opacity black mask
35+
3736

3837

Source/Extend/UIColor/UIColor+YAColorMixing.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
@interface UIColor (YAColorMixing)
1212

13+
/**
14+
* Return a new color made by overlaying a given color to the top of receiver.
15+
* @param addingColor The color to overlay to the top of the receiver. This value must not be nil.
16+
*/
1317
- (UIColor *)colorByAddingColor:(UIColor *)addingColor;
1418

1519
@end

Source/Extend/UIColor/UIColor+YAColorMixing.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ - (UIColor *)colorByAddingColor:(UIColor *)addingColor
1515
CGFloat upperRed, upperGreen, upperBlue, upperAlpha = 0;
1616
CGFloat underRed, underGreen, underBlue, underAlpha = 0;
1717
CGFloat resultRed, resultGreen, resultBlue, resultAlpha = 0;
18-
18+
1919
[addingColor getRed:&upperRed green:&upperGreen blue:&upperBlue alpha:&upperAlpha];
2020
[self getRed:&underRed green:&underGreen blue:&underBlue alpha:&underAlpha];
2121

Source/Extend/UITableView/UITableView+YAReusableCell.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@
1010

1111
@interface UITableView (YAReusableCell)
1212

13-
- (id)dequeueReusableCellWithClass:(Class)aClass;
13+
/** Returns a reusable table-view cell object for the specified reuse class and adds it to the table.
14+
* @param aClass A table-view cell class to be reused. This parameter must not be nil and subclass of
15+
* UITableViewCell.
16+
*/
17+
- (instancetype)dequeueReusableCellWithClass:(Class)aClass;
18+
1419
- (void)registerReuseCellClass:(Class)cellClass;
1520

1621
- (id)dequeueReusableHeaderFooterViewWithClass:(Class)aClass;

Source/Extend/UITableView/UITableView+YAReusableCell.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ - (void)registerReuseCellClass:(Class)cellClass
1515
[self registerClass:cellClass forCellReuseIdentifier:NSStringFromClass(cellClass)];
1616
}
1717

18-
- (id)dequeueReusableCellWithClass:(Class)aClass
18+
- (instancetype)dequeueReusableCellWithClass:(Class)aClass
1919
{
20-
return [self dequeueReusableCellWithIdentifier:NSStringFromClass(aClass)];
20+
if ([aClass isSubclassOfClass:[UITableViewCell class]]) {
21+
return [self dequeueReusableCellWithIdentifier:NSStringFromClass(aClass)];
22+
}
23+
return nil;
2124
}
2225

2326
- (void)registerReuseHeaderFooterClass:(Class)aClass

Source/SkinManager/YASkinManager.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ - (UIColor *)colorForTag:(NSString *)tag
8787
UIColor *color = nil;
8888
if ([colorHex isKindOfClass:[NSNumber class]]) {
8989
color = [UIColor colorWithHex:[colorHex integerValue]];
90+
} else {
91+
color = [UIColor colorWithHexString:colorHex];
9092
}
9193

9294
return color;

YAUIKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = 'YAUIKit'
4-
s.version = '3.0.0'
4+
s.version = '3.0.1'
55
s.summary = 'YAUIKit'
66
s.homepage = 'https://github.com/candyan/YAUIKit'
77
s.license = 'MIT'

0 commit comments

Comments
 (0)