Skip to content

Instantly share code, notes, and snippets.

@justinmstuart
Last active August 29, 2015 14:05
Show Gist options
  • Save justinmstuart/599ea34287c26fc36de4 to your computer and use it in GitHub Desktop.
Save justinmstuart/599ea34287c26fc36de4 to your computer and use it in GitHub Desktop.
Respond to a User Changing the Text Size in System Preferences
override func viewDidLoad() {
super.viewDidLoad()
NSNotificationCenter.defaultCenter().addObserver(self, selector: "preferredContentSizeChanged", name: UIContentSizeCategoryDidChangeNotification, object: nil)
}
func preferredContentSizeChanged () {
NSLog("User wants the Font to Change")
label.font = UIFont.preferredCustomFontForTextStyle(UIFontTextStyleBody)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment