When writing an app, you sometimes comes across situations where you need to adjust the position and size of a label based on the size of the text. And that size could be different based on a particular font you're using. So, today i'm going to show you how you can quickly grab the size of a string with a specified font. Prior to iOS 7 you could use: CGSize size = [@“Infragistics" sizeWithFont:[UIFont fontWithName:@"Avenir-Book" size:20]]; However, in iOS 7 that method was...(read more)
↧