In iOS 7, sizeWithFont: is now deprecated. How do I now pass in the UIFont object into the replacement method sizeWithAttributes:?
sizeWithFont:
sizeWithAttributes:
- (CGSize) sizeWithMyFont:(UIFont *)fontToUse { if ([self respondsToSelector:@selector(sizeWithAttributes:)]) { NSDictionary* attribs = @{NSFontAttributeName:fontToUse}; return ([self sizeWithAttributes:attribs]); } return ([self sizeWithFont:fontToUse]); }