summaryrefslogtreecommitdiff
path: root/CyteKit/TableViewCell.mm
diff options
context:
space:
mode:
Diffstat (limited to 'CyteKit/TableViewCell.mm')
-rw-r--r--CyteKit/TableViewCell.mm13
1 files changed, 13 insertions, 0 deletions
diff --git a/CyteKit/TableViewCell.mm b/CyteKit/TableViewCell.mm
index 827440b..1b9152e 100644
--- a/CyteKit/TableViewCell.mm
+++ b/CyteKit/TableViewCell.mm
@@ -56,6 +56,19 @@
bool highlighted_;
}
+- (instancetype) initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier {
+ if ((self = [super initWithFrame:frame reuseIdentifier:reuseIdentifier]) != nil) {
+ UIView *content([self contentView]);
+ CGRect bounds([content bounds]);
+
+ self.content = [[[CyteTableViewCellContentView alloc] initWithFrame:bounds] autorelease];
+ [self.content setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
+ [content addSubview:self.content];
+
+ [self.content setDelegate:(id<CyteTableViewCellDelegate>)self];
+ } return self;
+}
+
- (void) _updateHighlightColorsForView:(UIView *)view highlighted:(BOOL)highlighted {
if (view == (UIView *) content_)
highlighted_ = highlighted;