Skip to content

Instantly share code, notes, and snippets.

@Broich
Created March 12, 2014 16:09
Show Gist options
  • Save Broich/9510130 to your computer and use it in GitHub Desktop.
Save Broich/9510130 to your computer and use it in GitHub Desktop.
- (void)layoutSubviews
{
[super layoutSubviews];
if (self.viewOption == BKCollectionViewOptionGalery) {
NSLog(@"layout for galery");
self.userImageView.frame = CGRectMake(5.0f, 5.0f, 143.0f, 143.0f);
self.nameLabel.frame = CGRectMake(5.0f, 153.0f, 143.0f, 20.0f);
self.separationLine.frame = CGRectMake(5.0f, 174.0f, 143.0f, .5f);
self.onlineStatusImageView.frame = CGRectMake(5.0f, 175.0f, 20.0f, 15.0f);
self.ageLabel.frame = CGRectMake(28.0f, 175.0f, 25.0f, 15.0f);
self.cityLabel.frame = CGRectMake(58.0f, 175.0f, 90.0f, 15.0f);
return;
}
if (self.viewOption == BKCollectionViewOptionList) {
NSLog(@"layout for list");
self.userImageView.frame = CGRectMake(5.0f, 5.0f, 60.0f, 60.0f);
self.nameLabel.hidden = YES;
self.separationLine.hidden = YES;
self.onlineStatusImageView.hidden = YES;
self.ageLabel.hidden = YES;
self.cityLabel.hidden = YES;
return;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment