Created
June 23, 2014 03:51
-
-
Save happyrobots/32a0dc8ce028416688ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import ObjectiveC; | |
@interface NSObject (LN_FORCE_SHAPES) | |
@end | |
@implementation NSObject (LN_FORCE_SHAPES) | |
+ (void)load | |
{ | |
Method m1, m2; | |
m1 = class_getInstanceMethod(NSClassFromString(@"UINavigationButton"), @selector(_wantsAccessibilityButtonShapes)); | |
m2 = class_getInstanceMethod([NSObject class], @selector(_wantsAccessibilityButtonShapes)); | |
method_exchangeImplementations(m1, m2); | |
m1 = class_getInstanceMethod(NSClassFromString(@"UINavigationItemButtonView"), @selector(_wantsAccessibilityButtonShapes)); | |
m2 = class_getInstanceMethod([NSObject class], @selector(_wantsAccessibilityButtonShapes)); | |
method_exchangeImplementations(m1, m2); | |
m1 = class_getInstanceMethod(NSClassFromString(@"UIToolbarButton"), @selector(_wantsAccessibilityButtonShapes)); | |
m2 = class_getInstanceMethod([NSObject class], @selector(_wantsAccessibilityButtonShapes)); | |
method_exchangeImplementations(m1, m2); | |
} | |
- (BOOL)_wantsAccessibilityButtonShapes | |
{ | |
return YES; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment