The docs say:
+ (UIFont *)fontWithName:(NSString *)fontName size:(CGFloat)fontSize
The fully specified name of the font. This name incorporates both the
font family name and the specific style information for the font.
The examples I find only specify a font name. But I want to specify other attributes as well such as medium font weight etc. How is this encoded into the name?
See this answer for naming scheme. Full font list (with names) can be found here.
Example:
Update
iOS 8.2 added this method for fetching system fonts of different weights.
Example: