]> git.cameronkatri.com Git - tweaks.git/blob - HapticKeyboard/Tweak.x
847cb800bff81d406d67199531f26a1361e05cd4
[tweaks.git] / HapticKeyboard / Tweak.x
1 @interface UIKeyboardLayoutStar : UIView
2 @property (nonatomic, retain) UIImpactFeedbackGenerator *feedback;
3 @end
4
5 %hook UIKeyboardLayoutStar
6 %property (nonatomic, retain) UIImpactFeedbackGenerator *feedback;
7
8 -(void)touchDownWithKey:(id)arg1 withTouchInfo:(id)arg2 atPoint:(CGPoint)arg3 executionContext:(id)arg4
9 {
10 %orig;
11 if (!self.feedback)
12 self.feedback = UIImpactFeedbackGenerator.alloc.init;
13 [self.feedback prepare];
14 [self.feedback impactOccurred];
15 }
16
17 %end