Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Alternative Button
self.imageView.frame = (CGRect){.origin = (CGPoint){.x = margin, .y = margin}, .size = (CGSize){.width = imageViewWidth, .height = imageViewWidth}};
self.imageView.center = (CGPoint){.x = CGRectGetWidth(self.frame) / 2.0, .y = imageViewWidth / 2.0 + margin};
[self.titleLabel sizeToFit];
self.titleLabel.frame = (CGRect){.origin = (CGPoint){.x = margin, .y = imageViewWidth + 2 * margin}, .size = self.titleLabel.frame.size};
self.titleLabel.center = (CGPoint){.x = CGRectGetWidth(self.frame) / 2.0, .y = CGRectGetHeight(self.frame) - CGRectGetHeight(self.titleLabel.frame) / 2.0 - margin};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment