Created
October 17, 2012 09:37
-
-
Save akshay1188/3904688 to your computer and use it in GitHub Desktop.
UILabel category to bottom align label texts (Generally when they have different font sizes)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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