Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
UILabel category to bottom align label texts (Generally when they have different font sizes)
- (CGFloat)topAfterBottomAligningWithLabel:(UILabel *)label{
return (label.frame.origin.y - ((label.frame.origin.y + self.frame.size.height) - (label.frame.origin.y + label.frame.size.height)) + (label.font.descender - self.font.descender));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment