Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ignoring the dynamic type in iOS: Accessibility

Is there a way to completely ignore dynamic type/font size settings in iOS apps? I mean is there a way like a plist entry so that I can disable it completely. I understand there is a notification we can observe and re-configure the font whenever there is change in the settings. I am looking for a simpler solution. I am using iOS8. Thanks.

like image 718
sole007 Avatar asked Jan 07 '15 07:01

sole007


People also ask

How do I get rid of dynamic type on my Iphone?

Try a reset: Simultaneously hold down the Home and On buttons until the device shuts down. Ignore the off slider if it appears.

Why is supporting dynamic type important in iOS?

The Dynamic Type feature allows users to choose the size of textual content displayed on the screen. It helps users who need larger text for better readability. It also accomodates those who can read smaller text, allowing more information to appear on the screen.

What is dynamic text on Iphone?

Dynamic Type is a feature on iOS that enables the app's content to scale based on the user's preferred content size. It helps users who need larger text for better readability. And it also accommodates those who can read smaller text, allowing for more information to appear on the screen.

Does Snapchat support dynamic type?

You can add Dynamic Text to your Text by clicking the Insert button labeled with Dynamic Text . You'll be presented with a list of Dynamic Text types that can be added. Available Dynamic Text types are: Altitude, Birthday, City, Date, Date Short, Date and Time, Day, Display Name, Month, Temperature, Time and Weather.


1 Answers

In your AppDelegate add:

#import <objc/runtime.h>

@implementation AppDelegate

NSString* swizzled_preferredContentSizeCategory(id self, SEL _cmd)
{
    return UIContentSizeCategoryLarge;  // Set category you prefer, Large being iOS' default.
}

- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
    Method method = class_getInstanceMethod([UIApplication class], @selector(preferredContentSizeCategory));
    method_setImplementation(method, (IMP)swizzled_preferredContentSizeCategory);

    ...
}
like image 197
meaning-matters Avatar answered Nov 15 '22 17:11

meaning-matters