Skip to content

Instantly share code, notes, and snippets.

@r-plus
Created June 20, 2012 13:25
Show Gist options
  • Select an option

  • Save r-plus/2959862 to your computer and use it in GitHub Desktop.

Select an option

Save r-plus/2959862 to your computer and use it in GitHub Desktop.
#import <Foundation/Foundation.h>
#import <CoreFoundation/CoreFoundation.h>
#import <objc/runtime.h>
#import <UIKit/UIKit.h>
@class UIKeyboardLayoutStar;
static BOOL replaced_UIKeyboardLayoutStar_shouldShowDictationKey(UIKeyboardLayoutStar *self, SEL _cmd) {
return NO;
}
__attribute__((constructor))
static void OverrideMethodFunction() {
Method method = class_getMethodImplementation([UIKeyboardLayoutStar class], @selector(shouldShowDictationKey));
method_setImplementation(method, &replaced_UIKeyboardLayoutStar_shouldShowDictationKey);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment