DynamicFontSizeHelper
DynamicFontSizeHelper copied to clipboard
A helper that simplifies handling dynamic content size category with only one line of code.
DynamicFontSizeHelper
A helper that simplifies handling dynamic content size category with only one line of code.
How to use
Drag and drop the DynamicFontSizeHelper.swift file to your project.
Interface Builder
- Select the
UILabelthat you want to support dynamic content size. - Under Attribute Inspector, set the Register For Size Change With Default Font Size to any
CGFloatnumber you want. - No more!
Programmatically
// Initialize my label somewhere
let myLabel: UILabel
// And then
myLabel.registerForSizeChangeWithDefaultFontSize = 14.0
What do I get?
This is what you get:

License
MIT