react native - ios - enabling Larger Text form accessibility messed up everything

Viewed 1151

So far my app was looking gorgeous but as soon as this "Larger Text" option is enabled from "Accessibility" everything started looking dirty, even the navigation bar.

Please suggest a way to handle these changes intelligently. enter image description here

2 Answers

You need to disable font scaling in your app for this to not happen. To do this, put this line in class constructor found in index.ios.js

Text.defaultProps.allowFontScaling = false;

Note: This may shrink your font, depending on what your accessibility settings were previously, but now you are free to set fontSize to whatever you want.

Related