From bc56c9f5604390fca1c40036a51811d948b100a9 Mon Sep 17 00:00:00 2001 From: matt handler Date: Fri, 22 Apr 2011 14:22:56 -0400 Subject: clean up topics table view cell --- Classes/TopicTableViewCell.m | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/Classes/TopicTableViewCell.m b/Classes/TopicTableViewCell.m index 4893ff4..2e87d28 100644 --- a/Classes/TopicTableViewCell.m +++ b/Classes/TopicTableViewCell.m @@ -11,7 +11,7 @@ @implementation TopicTableViewCell -@synthesize useDarkBackground, title, iconUrl, picCount, picCountLabel, gradient; // titleLabel, icon +@synthesize title, iconUrl, picCount, picCountLabel, gradient; // titleLabel, icon - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { @@ -24,33 +24,6 @@ return self; } - -#define DARK_BACKGROUND [UIColor colorWithRed:200.0/255.0 green:240.0/255.0 blue:240.0/255.0 alpha:1.0] -#define LIGHT_BACKGROUND [UIColor colorWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:1.0] - -- (void)setUseDarkBackground:(BOOL)flag -{ - if (flag != useDarkBackground || !self.backgroundView) - { - useDarkBackground = flag; - - //NSString *backgroundImagePath = [[NSBundle mainBundle] pathForResource:useDarkBackground ? @"DarkBackground" : @"LightBackground" ofType:@"png"]; - //UIImage *backgroundImage = [[UIImage imageWithContentsOfFile:backgroundImagePath] stretchableImageWithLeftCapWidth:0.0 topCapHeight:1.0]; - //self.backgroundView = [[[UIImageView alloc] initWithImage:backgroundImage] autorelease]; - //self.backgroundView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - - //self.backgroundColor = LIGHT_BACKGROUND; - //[self setBackgroundColor:LIGHT_BACKGROUND]; - //[self.contentView setBackgroundColor:LIGHT_BACKGROUND]; - } - else { - //[self.contentView setBackgroundColor:DARK_BACKGROUND]; - //[self setBackgroundColor:DARK_BACKGROUND]; - //self.backgroundColor = DARK_BACKGROUND; - } - self.backgroundView.frame = self.bounds; -} - - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [gradient removeFromSuperview]; [super setSelected:selected animated:animated]; @@ -73,6 +46,11 @@ - (void)dealloc { //NSLog(@"powering down"); + [title release]; + [iconUrl release]; + [picCount release]; + [gradient release]; + [picCountLabel release]; [super dealloc]; } -- cgit v1.2.3