forked from escoz/QuickDialog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
QFlatAppearance.m
78 lines (55 loc) · 2.54 KB
/
QFlatAppearance.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
//
// Created by Eduardo Scoz on 7/18/13.
//
// To change the template use AppCode | Preferences | File Templates.
//
#import "QFlatAppearance.h"
@implementation QFlatAppearance {
}
- (void)setDefaults {
[super setDefaults];
self.labelColorDisabled = [UIColor lightGrayColor];
self.labelColorEnabled = [UIColor blackColor];
self.actionColorDisabled = [UIColor lightGrayColor];
self.actionColorEnabled = [UIColor blackColor];
self.sectionTitleFont = nil;
self.sectionTitleShadowColor = [UIColor clearColor];
self.sectionTitleColor = nil;
self.sectionFooterFont = nil;
self.sectionFooterColor = [UIColor colorWithRed:0.2417 green:0.5295 blue:0.9396 alpha:1.0000];
self.labelAlignment = NSTextAlignmentLeft;
self.backgroundColorDisabled = [UIColor whiteColor];
self.backgroundColorEnabled = [UIColor whiteColor];
self.entryTextColorDisabled = [UIColor lightGrayColor];
self.entryTextColorEnabled = [UIColor colorWithRed:0.243 green:0.306 blue:0.435 alpha:1.0];
self.entryAlignment = NSTextAlignmentLeft;
self.buttonAlignment = NSTextAlignmentLeft;
self.valueColorEnabled = [UIColor colorWithRed:0.1653 green:0.2532 blue:0.4543 alpha:1.0000];
self.valueColorDisabled = [UIColor lightGrayColor];
self.valueAlignment = NSTextAlignmentRight;
self.toolbarStyle = UIBarStyleDefault;
self.toolbarTranslucent = YES;
self.cellBorderWidth = 14;
#if __IPHONE_7_0
if ([UIFont respondsToSelector:@selector(preferredFontForTextStyle:)]) {
self.valueFont = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
self.labelFont = [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline];
self.entryFont = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
}
#endif
}
- (UIView *)buildHeaderForSection:(QSection *)section andTableView:(QuickDialogTableView *)view andIndex:(NSInteger)index1 {
return nil;
}
- (UIView *)buildFooterForSection:(QSection *)section andTableView:(QuickDialogTableView *)view andIndex:(NSInteger)index1 {
return nil;
}
- (void)cell:(UITableViewCell *)cell willAppearForElement:(QElement *)element atIndexPath:(NSIndexPath *)path {
[super cell:cell willAppearForElement:element atIndexPath:path];
}
- (CGFloat)heightForHeaderInSection:(QSection *)section andTableView:(QuickDialogTableView *)tableView andIndex:(NSInteger)index {
if (section.headerView!=nil)
return section.headerView.bounds.size.height;
return [super heightForHeaderInSection:section andTableView:tableView andIndex:index];
}
@end