forked from soffes/cheddar-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CDISettingsTableViewCell.m
40 lines (34 loc) · 1.63 KB
/
CDISettingsTableViewCell.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
//
// CDISettingsTableViewCell.m
// Cheddar for iOS
//
// Created by Sam Soffes on 7/28/12.
// Copyright (c) 2012 Nothing Magical. All rights reserved.
//
#import "CDISettingsTableViewCell.h"
#import "UIColor+CheddariOSAdditions.h"
#import "UIFont+CheddariOSAdditions.h"
@implementation CDISettingsTableViewCell
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if ((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) {
self.backgroundColor = [UIColor whiteColor];
self.textLabel.font = [UIFont cheddarFontOfSize:17.0f];
self.textLabel.textColor = [UIColor cheddarTextColor];
self.detailTextLabel.font = [UIFont cheddarFontOfSize:17.0f];
self.detailTextLabel.textColor = [UIColor cheddarBlueColor];
UIImageView *disclosureImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 10.0f, 15.0f)];
disclosureImageView.image = [UIImage imageNamed:@"disclosure.png"];
self.accessoryView = disclosureImageView;
disclosureImageView.highlightedImage = [UIImage imageNamed:@"disclosure-highlighted.png"];
SSGradientView *selectedBackground = [[SSGradientView alloc] initWithFrame:CGRectZero];
selectedBackground.colors = [[NSArray alloc] initWithObjects:
[UIColor colorWithRed:0.0f green:0.722f blue:0.918f alpha:1.0f],
[UIColor colorWithRed:0.0f green:0.631f blue:0.835f alpha:1.0f],
nil];
selectedBackground.bottomBorderColor = [UIColor colorWithRed:0.0f green:0.502f blue:0.725f alpha:1.0f];
selectedBackground.contentMode = UIViewContentModeRedraw;
self.selectedBackgroundView = selectedBackground;
}
return self;
}
@end