add the following code to your viewDidLoad to get notified when font size is changed from settings accessibility.
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(preferredContentSizeChanged:)
name:UIContentSizeCategoryDidChangeNotification
object:nil];
Next, add the following method:
- (void)preferredContentSizeChanged:(NSNotification *)notification {
self.textView.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
}
This simply sets the text view font to one based on the new preferred size.
Note: You might be wondering why it seems you’re setting the font to the same value it had before. When the user changes their preferred font size, you must request the preferred font again; it won’t be updated automatically. The font returned via preferredFontForTextStyle: will be different when the font preferences are changed.
EDIT:
Refer to this post: https://mcmap.net/q/236911/-how-to-use-a-custom-font-with-dynamic-text-sizes-in-ios7
Prefer using real device to test [UIApplication sharedApplication].preferredContentSizeCategory;