Skip to content

Instantly share code, notes, and snippets.

@pier-oliviert
Created August 13, 2011 13:06
Show Gist options
  • Select an option

  • Save pier-oliviert/1143829 to your computer and use it in GitHub Desktop.

Select an option

Save pier-oliviert/1143829 to your computer and use it in GitHub Desktop.
- (void)layoutSubviews {
[self.fullNameLabel sizeToFit];
[self.bioTitleLabel sizeToFit];
[self.emailLabel sizeToFit];
self.profilePictureView.frame = CGRectOffset(self.profilePictureView.bounds, 15, 15);
self.fullNameLabel.frame = CGRectOffset(self.fullNameLabel.bounds, CGRectGetMaxX(self.profilePictureView.frame) + 10,
CGRectGetMidY(self.profilePictureView.frame) - 25);
if (self.emailLabel.superview) {
self.emailLabel.frame = CGRectOffset(self.emailLabel.bounds, CGRectGetMinX(self.fullNameLabel.frame),
CGRectGetMaxY(self.fullNameLabel.frame));
}
self.bioTitleLabel.frame = CGRectOffset(self.bioTitleLabel.bounds, CGRectGetMinX(self.profilePictureView.frame),
CGRectGetMaxY(self.profilePictureView.frame) + 16);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment