In iOS 7, sizeWithFont: is now deprecated. How do I now pass in the UIFont object into the replacement method sizeWithAttributes:?
sizeWithFont:
sizeWithAttributes:
Accepted answer in Xamarin would be (use sizeWithAttributes and UITextAttributeFont):
UIStringAttributes attributes = new UIStringAttributes { Font = UIFont.SystemFontOfSize(17) }; var size = text.GetSizeUsingAttributes(attributes);