A few minor fixes to new iOS example
This commit is contained in:
parent
ebfbbd198a
commit
24f2300579
2 changed files with 11 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -30,8 +30,6 @@
|
|||
@implementation TweetTableViewCell {
|
||||
@private
|
||||
__strong Tweet *_tweet;
|
||||
|
||||
__strong UIImageView *_maskImageView;
|
||||
}
|
||||
|
||||
@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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue