-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathC.m
97 lines (80 loc) · 3.61 KB
/
C.m
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
//
// C.m
// VVK
//
// Created by Kasutaja on 23.04.2024.
//
#import "C.h"
#import "UIColor+Hex.h"
@implementation C
+ (C*) sharedInstance
{
static C* sharedInstance = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^ {
sharedInstance = [[C alloc] init];
});
return sharedInstance;
}
#pragma mark - Colors
- (UIColor *)errorWindow {
UIColor* configColor = [[Config sharedInstance] colorForKey:@"error_window"];
UIColor* defaultColor = [UIColor colorWithHexString:@"#FF0000"];
return configColor != UIColor.clearColor ? configColor : defaultColor;
}
- (UIColor *)errorWindowForeground {
UIColor* configColor = [[Config sharedInstance] colorForKey:@"error_window_foreground"];
UIColor* defaultColor = [UIColor colorWithHexString:@"#FFFFFF"];
return configColor != UIColor.clearColor ? configColor : defaultColor;
}
- (UIColor *)mainWindowForeground {
UIColor* configColor = [[Config sharedInstance] colorForKey:@"main_window_foreground"];
UIColor* defaultColor = [UIColor colorWithHexString:@"#FFFFFF"];
return configColor != UIColor.clearColor ? configColor : defaultColor;
}
- (UIColor *)mainWindow {
UIColor* configColor = [[Config sharedInstance] colorForKey:@"main_window"];
UIColor* defaultColor = [UIColor colorWithHexString:@"#33B5E5"];
return configColor != UIColor.clearColor ? configColor : defaultColor;
}
- (UIColor *)lblBackground {
UIColor* configColor = [[Config sharedInstance] colorForKey:@"lbl_background"];
UIColor* defaultColor = [UIColor colorWithHexString:@"#33B5E5"];
return configColor != UIColor.clearColor ? configColor : defaultColor;
}
- (UIColor *)lblForeground {
UIColor* configColor = [[Config sharedInstance] colorForKey:@"lbl_foreground"];
UIColor* defaultColor = [UIColor colorWithHexString:@"#FFFFFF"];
return configColor != UIColor.clearColor ? configColor : defaultColor;
}
- (UIColor *)lblOuterContainerBackground {
UIColor* configColor = [[Config sharedInstance] colorForKey:@"lbl_outer_container_background"];
UIColor* defaultColor = [UIColor colorWithHexString:@"#EAEAEA"];
return configColor != UIColor.clearColor ? configColor : defaultColor;
}
- (UIColor *)lblOuterContainerForeground {
UIColor* configColor = [[Config sharedInstance] colorForKey:@"lbl_outer_container_foreground"];
UIColor* defaultColor = [UIColor colorWithHexString:@"#404040"];
return configColor != UIColor.clearColor ? configColor : defaultColor;
}
- (UIColor *)lblInnerContainerForeground {
UIColor* configColor = [[Config sharedInstance] colorForKey:@"lbl_inner_container_foreground"];
UIColor* defaultColor = [UIColor colorWithHexString:@"#404040"];
return configColor != UIColor.clearColor ? configColor : defaultColor;
}
- (UIColor *)lblCloseTimeoutForeground {
UIColor* configColor = [[Config sharedInstance] colorForKey:@"lbl_close_timeout_foreground"];
UIColor* defaultColor = [UIColor colorWithHexString:@"#454444"];
return configColor != UIColor.clearColor ? configColor : defaultColor;
}
- (UIColor *)lblCloseTimeoutBackgroundCenter {
UIColor* configColor = [[Config sharedInstance] colorForKey:@"lbl_close_timeout_background_center"];
UIColor* defaultColor = [UIColor colorWithHexString:@"#F9D303"];
return configColor != UIColor.clearColor ? configColor : defaultColor;
}
- (UIColor *)lblOuterInnerContainerDivider {
UIColor* configColor = [[Config sharedInstance] colorForKey:@"lbl_outer_inner_container_divider"];
UIColor* defaultColor = [UIColor colorWithHexString:@"#595959"];
return configColor != UIColor.clearColor ? configColor : defaultColor;
}
@end