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];
|
return [_tweets count];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
|
||||||
return [TweetTableViewCell heightForCellWithTweet:[_tweets objectAtIndex:indexPath.row]];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
static NSString *CellIdentifier = @"Cell";
|
static NSString *CellIdentifier = @"Cell";
|
||||||
|
|
||||||
|
|
@ -117,4 +113,14 @@
|
||||||
return cell;
|
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
|
@end
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,7 @@
|
||||||
|
|
||||||
@implementation TweetTableViewCell {
|
@implementation TweetTableViewCell {
|
||||||
@private
|
@private
|
||||||
__strong Tweet *_tweet;
|
__strong Tweet *_tweet;
|
||||||
|
|
||||||
__strong UIImageView *_maskImageView;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@synthesize tweet = _tweet;
|
@synthesize tweet = _tweet;
|
||||||
|
|
@ -48,9 +46,6 @@
|
||||||
self.detailTextLabel.numberOfLines = 0;
|
self.detailTextLabel.numberOfLines = 0;
|
||||||
self.selectionStyle = UITableViewCellSelectionStyleGray;
|
self.selectionStyle = UITableViewCellSelectionStyleGray;
|
||||||
|
|
||||||
_maskImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"profile-image-mask"]];
|
|
||||||
[self addSubview:_maskImageView];
|
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -76,7 +71,6 @@
|
||||||
- (void)layoutSubviews {
|
- (void)layoutSubviews {
|
||||||
[super layoutSubviews];
|
[super layoutSubviews];
|
||||||
self.imageView.frame = CGRectMake(10.0f, 10.0f, 50.0f, 50.0f);
|
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);
|
self.textLabel.frame = CGRectMake(70.0f, 10.0f, 240.0f, 20.0f);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue