-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGeneralPurposeViewCellData.m
91 lines (75 loc) · 2.23 KB
/
GeneralPurposeViewCellData.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
//
// GeneralPurposeViewCellData.m
// AvocadoTest1
//
// Created by Jake on 12-02-17.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import "GeneralPurposeViewCellData.h"
NSString* VIEW_CELL_NEEDS_REDRAW = @"CroutonLabs/ViewCellNeedsRedraw";
@implementation GeneralPurposeViewCellData
@synthesize title;
@synthesize titleFont;
@synthesize description;
@synthesize descriptionFont;
@synthesize indent;
@synthesize cellColour;
@synthesize disclosureArrow;
@synthesize height;
-(id)init
{
self = [super init];
if(self)
{
disclosureArrow = NO;
title = @"";
description = @"";
indent = 0;
cellColour = [UIColor whiteColor];
height = 44.0f;
titleFont = [UIFont fontWithName:@"AmericanTypewriter" size:14];
descriptionFont = [UIFont fontWithName:@"AmericanTypewriter" size:14];
}
return self;
}
-(void)setTitle:(NSString *)aTitle
{
title = aTitle;
[[NSNotificationCenter defaultCenter] postNotificationName:VIEW_CELL_NEEDS_REDRAW object:self];
}
-(void)setTitleFont:(UIFont *)aFont
{
titleFont = aFont;
[[NSNotificationCenter defaultCenter] postNotificationName:VIEW_CELL_NEEDS_REDRAW object:self];
}
-(void)setDescription:(NSString *)aDescription
{
description = aDescription;
[[NSNotificationCenter defaultCenter] postNotificationName:VIEW_CELL_NEEDS_REDRAW object:self];
}
-(void)setDescriptionFont:(UIFont *)aFont
{
descriptionFont = aFont;
[[NSNotificationCenter defaultCenter] postNotificationName:VIEW_CELL_NEEDS_REDRAW object:self];
}
-(void)setIndent:(NSInteger)anIndent
{
indent = anIndent;
[[NSNotificationCenter defaultCenter] postNotificationName:VIEW_CELL_NEEDS_REDRAW object:self];
}
-(void)setCellColour:(UIColor *)aColour
{
cellColour = aColour;
[[NSNotificationCenter defaultCenter] postNotificationName:VIEW_CELL_NEEDS_REDRAW object:self];
}
-(void)setDisclosureArrow:(BOOL) boolValue
{
disclosureArrow = boolValue;
[[NSNotificationCenter defaultCenter] postNotificationName:VIEW_CELL_NEEDS_REDRAW object:self];
}
-(void)setHeight:(CGFloat)theHeight
{
height = theHeight;
[[NSNotificationCenter defaultCenter] postNotificationName:VIEW_CELL_NEEDS_REDRAW object:self];
}
@end