-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tweak.xm
31 lines (27 loc) · 1.25 KB
/
Tweak.xm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@interface UIDictationController : NSObject
+ (UIDictationController *)sharedInstance;
-(void)switchToDictationInputModeWithTouch:(id)arg1 ;
@end
@interface UIKeyboardDockView : UIView
@end
@interface UISystemKeyboardDockController : UIViewController
@property (nonatomic,retain) UIKeyboardDockView * dockView;
@end
%hook UISystemKeyboardDockController
-(void)loadView
{
%orig;
//NSLog(@"[LeftyDictation]----UISystemKeyboardDockController->loadView----------------------------------------");
//NSLog(@"[LeftyDictation]--------------------self:%@---------------------------------------------------------",self);
//NSLog(@"[LeftyDictation]--------------------[self dockView]:%@----------------------------------------------",[self dockView]);
UITapGestureRecognizer *singleTap = [[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(activateDictation)] autorelease];
singleTap.numberOfTapsRequired = 1;
[[self dockView] addGestureRecognizer:singleTap];
}
%new
- (void)activateDictation//:(UITapGestureRecognizer *)recognizer {
{
//NSLog(@"[LeftyDictation]--------------------activateDictation---------------------------------");
[[objc_getClass("UIDictationController") sharedInstance] switchToDictationInputModeWithTouch:nil];
}
%end