-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBIDNameandColorCell.m
More file actions
47 lines (39 loc) · 1.1 KB
/
BIDNameandColorCell.m
File metadata and controls
47 lines (39 loc) · 1.1 KB
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
//
// BIDNameandColorCell.m
// Cells
//
// Created by Scott Ashmore on 12-01-15.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
#import "BIDNameandColorCell.h"
@implementation BIDNameandColorCell
@synthesize name;
@synthesize color;
@synthesize nameLabel;
@synthesize colorLabel;
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
// Initialization code
}
return self;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
//defining my own setters so whenever new values are passed for the name or color properties we can update the labels we created earlier.
- (void)setName:(NSString *)n {
if (![n isEqualToString:name]) {
name = [n copy];
nameLabel.text = name; }
}
- (void)setColor:(NSString *)c {
if (![c isEqualToString:color]) {
color = [c copy];
colorLabel.text = color;
}
}
@end