Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. export ARCHS = armv7 arm64
  2. export TARGET = iphone:clang:latest:8.0
  3.  
  4. include $(THEOS)/makefiles/common.mk
  5.  
  6. TWEAK_NAME = YellowSquare
  7. YellowSquare_FILES = Tweak.xm
  8. YellowSquare_FRAMEWORKS = UIKit Foundation
  9. YellowSquare_LDFLAGS = -lAlertLib
  10.  
  11. include $(THEOS_MAKE_PATH)/tweak.mk
  12.  
  13. after-install::
  14. install.exec "killall -9 SpringBoard"
  15.  
  16. #import "AlertLib.h"
  17.  
  18. %hook AppDelegate
  19.  
  20. - (void) applicationDidBecomeActive:(UIApplication *) application
  21. {
  22. static dispatch_once_t once;
  23. dispatch_once(&once, ^{
  24.  
  25. UIView *yellowSquareView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
  26. yellowSquareView.backgroundColor = [UIColor yellowColor];
  27.  
  28. UILabel *tweakLabel = [[UILabel alloc] initWithFrame:yellowSquareView.bounds];
  29. tweakLabel.backgroundColor = [UIColor clearColor];
  30. tweakLabel.text = @"TWEAK";
  31. tweakLabel.font = [UIFont systemFontOfSize:25];
  32. tweakLabel.textAlignment = NSTextAlignmentCenter;
  33. [yellowSquareView addSubview:tweakLabel];
  34.  
  35. UIWindow *window = [UIApplication sharedApplication].keyWindow;
  36. yellowSquareView.center = window.center;
  37. [window addSubview:yellowSquareView];
  38.  
  39. [[AlertLib sharedInstance] showAlert];
  40. });
  41.  
  42. %orig;
  43. }
  44.  
  45. %end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement