Advertisement
Guest User

Untitled

a guest
Dec 17th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #import <UIKit/UIKit.h>
  2. #include "activatorheaders/libactivator.h"
  3.  
  4. static BOOL isOn = false;
  5.  
  6. @interface Alertpredict : NSObject <LAListener>
  7. @end
  8.  
  9. @implementation Alertpredict
  10.  
  11. - (void)activator:(LAActivator *)activator
  12.      receiveEvent:(LAEvent *)event
  13.   forListenerName:(NSString *)listenerName{
  14. [[[UIAlertView alloc] initWithTitle:@"Alertpredict"
  15.             message:@"You Toggled Predictive Text!"
  16.             delegate:nil
  17.             cancelButtonTitle:@"OK"
  18.             otherButtonTitles:nil] show];
  19.       isOn = !isOn;
  20. }
  21.  
  22. @end
  23.  
  24. static Alertpredict *alertpredictInstance;
  25.  
  26. %ctor{
  27.     alertpredictInstance = [[Alertpredict alloc] init];
  28.     [[LAActivator sharedInstance] registerListener:alertpredictInstance
  29.                                            forName:@"alertpredict"];
  30. }
  31.  
  32. %hook UIKeyboardImpl
  33. -(bool)canOfferPredictionsForTraits {
  34.     return isOn;
  35. }
  36.  
  37. -(bool)predictionForTraitsWithForceEnable:(bool)arg1 {
  38. arg1 = isOn;
  39. return isOn;
  40. }
  41. %end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement