From 24f2300579b4d47d76b18a57ef34920e770f46c6 Mon Sep 17 00:00:00 2001 From: Mattt Thompson Date: Mon, 12 Mar 2012 22:08:28 -0700 Subject: [PATCH] A few minor fixes to new iOS example --- .../Controllers/PublicTimelineViewController.m | 14 ++++++++++---- iOS Example/Classes/Views/TweetTableViewCell.m | 8 +------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/iOS Example/Classes/Controllers/PublicTimelineViewController.m b/iOS Example/Classes/Controllers/PublicTimelineViewController.m index 4504d02..8da1159 100644 --- a/iOS Example/Classes/Controllers/PublicTimelineViewController.m +++ b/iOS Example/Classes/Controllers/PublicTimelineViewController.m @@ -100,10 +100,6 @@ return [_tweets count]; } -- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { - return [TweetTableViewCell heightForCellWithTweet:[_tweets objectAtIndex:indexPath.row]]; -} - - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; @@ -117,4 +113,14 @@ return cell; } +#pragma mark - UITableViewDelegate + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { + return [TweetTableViewCell heightForCellWithTweet:[_tweets objectAtIndex:indexPath.row]]; +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + [tableView deselectRowAtIndexPath:indexPath animated:YES]; +} + @end diff --git a/iOS Example/Classes/Views/TweetTableViewCell.m b/iOS Example/Classes/Views/TweetTableViewCell.m index 9fb5f65..d0a4672 100644 --- a/iOS Example/Classes/Views/TweetTableViewCell.m +++ b/iOS Example/Classes/Views/TweetTableViewCell.m @@ -29,9 +29,7 @@ @implementation TweetTableViewCell { @private - __strong Tweet *_tweet; - - __strong UIImageView *_maskImageView; + __strong Tweet *_tweet; } @synthesize tweet = _tweet; @@ -48,9 +46,6 @@ self.detailTextLabel.numberOfLines = 0; self.selectionStyle = UITableViewCellSelectionStyleGray; - _maskImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"profile-image-mask"]]; - [self addSubview:_maskImageView]; - return self; } @@ -76,7 +71,6 @@ - (void)layoutSubviews { [super layoutSubviews]; self.imageView.frame = CGRectMake(10.0f, 10.0f, 50.0f, 50.0f); - _maskImageView.frame = self.imageView.frame; self.textLabel.frame = CGRectMake(70.0f, 10.0f, 240.0f, 20.0f);