diff options
author | Cameron Katri <me@cameronkatri.com> | 2021-08-08 16:37:36 -0400 |
---|---|---|
committer | Cameron Katri <me@cameronkatri.com> | 2021-08-08 16:37:36 -0400 |
commit | 027b91b5542974670fc4186a717634d347c98df2 (patch) | |
tree | 0c065a054a3400e35402ed6fcddf2e6c26d78384 /HapticKeyboard/Tweak.x | |
parent | c014bf2300cc36b313a05745cc3f286dc906a813 (diff) | |
download | tweaks-027b91b5542974670fc4186a717634d347c98df2.tar.gz tweaks-027b91b5542974670fc4186a717634d347c98df2.tar.zst tweaks-027b91b5542974670fc4186a717634d347c98df2.zip |
Add HapticKeyboard
Diffstat (limited to 'HapticKeyboard/Tweak.x')
-rw-r--r-- | HapticKeyboard/Tweak.x | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/HapticKeyboard/Tweak.x b/HapticKeyboard/Tweak.x new file mode 100644 index 0000000..847cb80 --- /dev/null +++ b/HapticKeyboard/Tweak.x @@ -0,0 +1,17 @@ +@interface UIKeyboardLayoutStar : UIView +@property (nonatomic, retain) UIImpactFeedbackGenerator *feedback; +@end + +%hook UIKeyboardLayoutStar +%property (nonatomic, retain) UIImpactFeedbackGenerator *feedback; + +-(void)touchDownWithKey:(id)arg1 withTouchInfo:(id)arg2 atPoint:(CGPoint)arg3 executionContext:(id)arg4 +{ + %orig; + if (!self.feedback) + self.feedback = UIImpactFeedbackGenerator.alloc.init; + [self.feedback prepare]; + [self.feedback impactOccurred]; +} + +%end |