JFFontObserver is used to update fonts and / or UI when a user changes their device font. It uses a simple observer approach to run font and / or UI update blocks.
The main purpose of this software is to provide developers with a simple way to add non-intrusive dynamic font support for applications.
Install via CocoaPods Add the following line to your .podfile
pod 'JFFontObserver'
Earliest tested and supported build and deployment target - iOS 6.0.
Latest tested and supported build and deployment target - iOS 9.0.
JFFontObserver is built from ARC and is ARC-only compatible.
Simply import the font observer class.
#import <JFFontObserver/JFFontObserver.h>
Add anything that needs updating to a font update block and it will be called upon system font size changes and, optionally, right away.
typeof(self) __weak weakSelf = self;
[JFFontObserver addObserver:self fontUpdateBlock:^{
weakSelf.label.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
} updateImmediatly:YES];