Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export ARCHS = armv7 arm64
- export TARGET = iphone:clang:latest:8.0
- include $(THEOS)/makefiles/common.mk
- TWEAK_NAME = YellowSquare
- YellowSquare_FILES = Tweak.xm
- YellowSquare_FRAMEWORKS = UIKit Foundation
- YellowSquare_LDFLAGS = -lAlertLib
- include $(THEOS_MAKE_PATH)/tweak.mk
- after-install::
- install.exec "killall -9 SpringBoard"
- #import "AlertLib.h"
- %hook AppDelegate
- - (void) applicationDidBecomeActive:(UIApplication *) application
- {
- static dispatch_once_t once;
- dispatch_once(&once, ^{
- UIView *yellowSquareView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
- yellowSquareView.backgroundColor = [UIColor yellowColor];
- UILabel *tweakLabel = [[UILabel alloc] initWithFrame:yellowSquareView.bounds];
- tweakLabel.backgroundColor = [UIColor clearColor];
- tweakLabel.text = @"TWEAK";
- tweakLabel.font = [UIFont systemFontOfSize:25];
- tweakLabel.textAlignment = NSTextAlignmentCenter;
- [yellowSquareView addSubview:tweakLabel];
- UIWindow *window = [UIApplication sharedApplication].keyWindow;
- yellowSquareView.center = window.center;
- [window addSubview:yellowSquareView];
- [[AlertLib sharedInstance] showAlert];
- });
- %orig;
- }
- %end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement