forked from arbales/SDListView
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SDListViewItem.m
44 lines (32 loc) · 855 Bytes
/
SDListViewItem.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
//
// SDListViewItem.m
// SingleListExample
//
// Created by Steven Degutis on 10/26/09.
//
#import "SDListViewItem.h"
#import "SDListView+Private.h"
@implementation SDListViewItem
@dynamic representedObject;
@dynamic view;
@synthesize listView;
@synthesize selected;
- (id) copyWithZone:(NSZone *)zone {
return [[[self class] alloc] initWithNibName:[self nibName] bundle:[self nibBundle]];
}
- (CGFloat) heightForGivenWidth:(CGFloat)width {
return 70.0; // generated by fair dice roll.
// guaranteed to be random.
}
- (void) setListView:(SDListView*)someListView {
listView = someListView;
}
- (void) setSelected:(BOOL)isSelected {
[self willChangeValueForKey:@"selected"];
selected = isSelected;
[self didChangeValueForKey:@"selected"];
}
- (void) noteViewHeightChanged {
[self.listView noteHeightChangedForItem:self];
}
@end