Skip to content

Commit 6896e92

Browse files
committed
change tint color
1 parent 6897ead commit 6896e92

File tree

17 files changed

+136
-41
lines changed

17 files changed

+136
-41
lines changed

CollectionViewClassifyMenu.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
9A3296041AB7D3880035EFAA /* CollectionViewClassifyMenuTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CollectionViewClassifyMenuTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
9696
9A3296091AB7D3880035EFAA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
9797
9A32960A1AB7D3880035EFAA /* CollectionViewClassifyMenuTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CollectionViewClassifyMenuTests.m; sourceTree = "<group>"; };
98+
9ACA68C11C3C3E8100CDB987 /* CYLParameterConfiguration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CYLParameterConfiguration.h; sourceTree = "<group>"; };
9899
/* End PBXFileReference section */
99100

100101
/* Begin PBXFrameworksBuildPhase section */
@@ -299,6 +300,7 @@
299300
children = (
300301
9A09E2F41BC7AFF00060C116 /* CYLDBManager.h */,
301302
9A09E2F51BC7AFF00060C116 /* CYLDBManager.m */,
303+
9ACA68C11C3C3E8100CDB987 /* CYLParameterConfiguration.h */,
302304
);
303305
path = Tool;
304306
sourceTree = "<group>";

CollectionViewClassifyMenu/Class/ClassifyMenu/Controller/CYLMainViewController.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
//Others
1313
#import "CYLFilterParamsTool.h"
1414
#import "AppDelegate.h"
15+
#import "CYLParameterConfiguration.h"
1516

1617
@interface CYLMainViewController ()<FilterControllerDelegate>
1718

CollectionViewClassifyMenu/Class/ClassifyMenu/Other/Category/UIButton+CollectionCellStyle.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@
1313
- (void)cyl_generalStyle;
1414
- (void)cyl_homeStyle;
1515
- (void)cyl_redStyle;
16+
//城觅客户端风格
17+
- (void)cyl_chengNiStyle;
1618

1719
@end

CollectionViewClassifyMenu/Class/ClassifyMenu/Other/Category/UIButton+CollectionCellStyle.m

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//
88

99
#import "UIButton+CollectionCellStyle.h"
10+
#import "CYLParameterConfiguration.h"
1011

1112
@implementation UIButton (CollectionCellStyle)
1213

@@ -18,7 +19,7 @@ - (void)cyl_generalStyle {
1819
}
1920

2021
- (void)cyl_homeStyle {
21-
self.titleLabel.font = [UIFont systemFontOfSize:15];
22+
self.titleLabel.font = CYLTagTitleFont;
2223
[self setTitleColor:[UIColor colorWithRed:18 / 255.0 green:133 / 255.0 blue:117 / 255.0 alpha:1] forState:UIControlStateNormal];
2324
[self setTitleColor:[UIColor colorWithRed:18 / 255.0 green:133 / 255.0 blue:117 / 255.0 alpha:0.7] forState:UIControlStateSelected];
2425
[self setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
@@ -29,7 +30,7 @@ - (void)cyl_homeStyle {
2930
}
3031

3132
- (void)cyl_redStyle {
32-
self.titleLabel.font = [UIFont systemFontOfSize:15];
33+
self.titleLabel.font = CYLTagTitleFont;
3334
[self setTitleColor:[UIColor colorWithRed:160 / 255.0 green:15 / 255.0 blue:85 / 255.0 alpha:1] forState:UIControlStateNormal];
3435
[self setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
3536

@@ -38,6 +39,19 @@ - (void)cyl_redStyle {
3839
self.layer.borderColor = [UIColor colorWithRed:160 / 255.0 green:15 / 255.0 blue:85 / 255.0 alpha:1].CGColor ;
3940
}
4041

42+
- (void)cyl_chengNiStyle {
43+
self.layer.cornerRadius = 13.0;
44+
self.layer.masksToBounds = YES;
45+
UIImage *imageNormal = [[self class] cyl_imageWithColor:[UIColor colorWithRed:230 / 255.0 green:255 / 255.0 blue:244 / 255.0 alpha:1]];
46+
[self setBackgroundImage:imageNormal forState:UIControlStateNormal];
47+
self.titleLabel.font = CYLTagTitleFont;
48+
[self setTitleColor:CYLAppTintColor forState:UIControlStateNormal];
49+
[self setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted];
50+
51+
UIImage *imageHighlighted = [UIImage imageNamed:@"tag_btn_background_highlighted"];
52+
[self setBackgroundImage:imageHighlighted forState:UIControlStateHighlighted];
53+
}
54+
4155
+ (UIImage *)cyl_imageWithColor:(UIColor *)color {
4256
CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f);
4357
UIGraphicsBeginImageContext(rect.size);

CollectionViewClassifyMenu/Class/ClassifyMenu/View/CollectionViewCell.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ - (void)setup {
3636
self.button = [CYLIndexPathButton buttonWithType:UIButtonTypeCustom];
3737
self.button.frame = CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height);
3838
[self.contentView addSubview:self.button];
39-
[self.button cyl_generalStyle];
40-
[self.button cyl_homeStyle];
41-
// [self.button redStyle];
39+
// [self.button cyl_generalStyle];
40+
// [self.button cyl_homeStyle];
41+
[self.button cyl_chengNiStyle];
4242
}
4343

4444
@end

CollectionViewClassifyMenu/Class/MultipleFilter/Controller/CYLMultipleFilterController.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
//Others
1414
#import "CYLFilterParamsTool.h"
1515
#import "CYLDBManager.h"
16+
#import "CYLParameterConfiguration.h"
1617

1718
@interface CYLMultipleFilterController ()
1819

@@ -271,7 +272,7 @@ - (CGSize)collectionView:(UICollectionView *)collectionView
271272
NSString *text = self.filterParamsTool.dataSources[indexPath.section][indexPath.row];
272273
CGSize size = [text sizeWithAttributes:
273274
@{NSFontAttributeName:
274-
[UIFont systemFontOfSize:16]}];
275+
CYLTagTitleFont}];
275276
float width = [self checkCellLimitWidth:ceilf(size.width)] ;
276277
return CGSizeMake(width, 30);
277278
}

CollectionViewClassifyMenu/Class/MultipleFilter/View/FilterCollectionCell.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//
88

99
#import <UIKit/UIKit.h>
10+
#import "CYLParameterConfiguration.h"
1011

1112
@implementation UIImage (Stretch)
1213

@@ -33,7 +34,7 @@ - (id)initWithFrame:(CGRect)frame {
3334
- (void)setup {
3435
self.titleButton = [CYLIndexPathButton buttonWithType:UIButtonTypeCustom];
3536
_titleButton.userInteractionEnabled = NO;
36-
_titleButton.titleLabel.font = [UIFont systemFontOfSize:15];
37+
_titleButton.titleLabel.font = CYLTagTitleFont;
3738
[_titleButton setBackgroundImage:[UIImage stretchableImageNamed:@"btn_slide_normal"] forState:UIControlStateNormal];
3839
[_titleButton setBackgroundImage:[UIImage stretchableImageNamed:@"btn_slide_selected"] forState:UIControlStateSelected];
3940
[_titleButton setTitleColor:[UIColor colorWithRed:96 / 255.f green:147 / 255.f blue:130 / 255.f alpha:1.f]

CollectionViewClassifyMenu/Class/Other/Symtem/AppDelegate.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#import "AppDelegate.h"
1010
#import "CYLMainViewController.h"
1111
#import "CYLFilterParamsTool.h"
12+
#import "CYLParameterConfiguration.h"
1213

1314
@interface AppDelegate ()
1415

@@ -22,7 +23,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
2223
if ([UINavigationBar conformsToProtocol:@protocol(UIAppearanceContainer)]) {
2324
[UINavigationBar appearance].tintColor = [UIColor whiteColor];
2425
[[UINavigationBar appearance] setTitleTextAttributes:@{NSFontAttributeName : [UIFont boldSystemFontOfSize:18], NSForegroundColorAttributeName : [UIColor whiteColor]}];
25-
[[UINavigationBar appearance] setBarTintColor:[UIColor colorWithRed:(51) / 255.f green:(171) / 255.f blue:(160) / 255.f alpha:1.f]];
26+
[[UINavigationBar appearance] setBarTintColor:CYLAppTintColor];
2627
[[UINavigationBar appearance] setTranslucent:NO];
2728
}
2829
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"scale" : "1x"
6+
},
7+
{
8+
"idiom" : "universal",
9+
"filename" : "tag_btn_background_highlighted.png",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"version" : 1,
19+
"author" : "xcode"
20+
}
21+
}

0 commit comments

Comments
 (0)