Skip to content

Commit 63e66e3

Browse files
committed
修改tag颜色
1 parent 7bfbda9 commit 63e66e3

1 file changed

Lines changed: 1 addition & 15 deletions

File tree

Coding_iOS/Views/Cell/ScreenCell.m

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -72,21 +72,7 @@ - (void)setTitle:(NSString *)title {
7272

7373
- (void)setColor:(NSString *)color {
7474
_color = color;
75-
76-
/*
77-
static int i = 0;
78-
79-
if (i % 2 == 0) {
80-
_tagButton.tintColor = [UIColor redColor];
81-
82-
}else {
83-
_tagButton.tintColor = [UIColor yellowColor];
84-
85-
}
86-
i++;
87-
*/
88-
89-
_tagButton.tintColor = [UIColor colorWithHexString:color];
75+
_tagButton.tintColor = [UIColor colorWithHexString:[NSString stringWithFormat:@"0x%@", [color substringFromIndex:1]]];
9076
}
9177

9278
@end

0 commit comments

Comments
 (0)