I have an observer for UIContentSizeCategoryDidChangeNotification that gets triggerd when a user changes the font-size under settings -> accessibility.
NSNotificationCenter.defaultCenter().addObserver(self, selector: "preferredContentSizeChanged:", name: UIContentSizeCategoryDidChangeNotification, object: nil)
I've never experienced any problems with this before, but now i am having problems with it on the iphone simulator iOS 9.3. It works however on a real device with iOS 9.3.
The simulator returns
bogus value for UIPreferredContentSizeCategoryName: (null)
Has anyone else experienced the same problem?
It's very simple you just drag any . MOV file to your simulator. Now it will be opened in Safari browser.
Close unused applications to free system resources such as cpu & memory. make sure "slow animations" is not selected in the simulator debug menu. Short cut for this is ⌘T simulator -> Debug -> slow animations.
It seems like a bug in iOS, I have written this:
print(UIApplication.sharedApplication().preferredContentSizeCategory)
And I found, when the app is running on a real device with iOS 9.3, the console info could be UICTContentSizeCategoryXXXL、UICTContentSizeCategoryXXL、UICTContentSizeCategoryXL、UICTContentSizeCategoryL、UICTContentSizeCategoryM、UICTContentSizeCategoryS、UICTContentSizeCategoryXS
But when the app in running on iOS simulator with iOS 9.3, the console info is always UICTContentSizeCategoryL
, no matter what font size I chose in settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With