Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* How to Hook with Logos
- Hooks are written with syntax similar to that of an Objective-C @implementation.
- You don't need to #include <substrate.h>, it will be done automatically, as will
- the generation of a class list and an automatic constructor.
- %hook ClassName
- // Hooking a class method
- + (id)sharedInstance {
- return %orig;
- }
- // Hooking an instance method with an argument.
- - (void)messageName:(int)argument {
- %log; // Write a message about this call, including its class, name and arguments, to the system log.
- %orig; // Call through to the original function with its original arguments.
- %orig(nil); // Call through to the original function with a custom argument.
- // If you use %orig(), you MUST supply all arguments (except for self and _cmd, the automatically generated ones.)
- }
- // Hooking an instance method with no arguments.
- - (id)noArguments {
- %log;
- id awesome = %orig;
- [awesome doSomethingElse];
- return awesome;
- }
- // Always make sure you clean up after yourself; Not doing so could have grave consequences!
- %end
- */
- #import <UIKit/UIKit.h>
- #import <SpringBoard/SpringBoard.h>
- @interface SBFLockScreenDateView : UIView
- @property (nonatomic,retain) UIColor * textColor;
- @end
- @interface SBLockScreenDateView : UIView
- @property (nonatomic,retain) UIColor * textColor;
- @end
- @interface SBIconListView : UIView
- @end
- %hook SBLockScreenDateViewController
- -(void)setCustomSubtitleText:(id)arg1 withColor:(id)arg2{
- %orig(@βTESTβ,[UIColor colorWithRed:(188/255.f) green:(188/255.f) blue:(188/255.f) alpha:1.0]);
- }
- %end
- %hook SBHUDController
- -(void)presentHUDView:(UIView*)HUDView autoDismissWithDelay:(CGFloat)delay{
- CGRect dimensions = [[UIScreen mainScreen] bounds];
- HUDView.frame = dimensions;
- %orig;
- }
- %end
- %hook SpringBoard
- -(BOOL)isOnAC{
- return YES; // TRUE
- }
- -(float)batteryCapacity{
- 55.0;
- }
- %end
- %hook SBDockIconListView
- + (NSUInteger)maxIcons {
- return 10;
- }
- %end
- %hook SBIconListView
- +(unsigned long long)maxIcons {
- return 10;
- }
- +(unsigned long long)iconRowsForInterfaceOrientation:(long long)arg1{
- return 10;
- }
- -(CGSize)defaultIconSize{
- CGSize srcSize = %orig;
- srcSize = CGSizeMake(50.0, 100.0);
- return srcSize;
- }
- %end
- %hook SBFLockScreenDateView
- -(UIColor *)textColor {
- return [UIColor colorWithRed:(188/255.f) green:(188/255.f) blue:(188/255.f) alpha:1.0];
- }
- %end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement