Last active
August 10, 2016 21:29
-
-
Save ninjaprawn/15507948d0e3dff993f3 to your computer and use it in GitHub Desktop.
it was greeny D:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@interface SBApplicationController | |
+(id)sharedInstance; | |
-(id)applicationWithBundleIdentifier:(id)arg1 ; | |
@end | |
@interface SBApplication | |
@end | |
@interface SBApplicationIcon : NSObject | |
-(id)initWithApplication:(id)arg1 ; | |
@end | |
@interface SBIcon | |
@end | |
@interface SBIconView : UIView | |
@property(retain, nonatomic) SBIcon *icon; | |
@end | |
@interface SBIconViewMap | |
+(id)homescreenMap; | |
-(id)mappedIconViewForIcon:(id)arg1 ; | |
@end | |
@interface SBIconController | |
+(id)sharedInstance; | |
- (void)_revealMenuForIconView:(id)arg1 presentImmediately:(BOOL)arg2; | |
@end | |
%hook SBIconView | |
-(void)setLocation:(int)arg1 { | |
UISwipeGestureRecognizer *swipeUp = [[[%c(UISwipeGestureRecognizer) alloc] initWithTarget:self action:@selector(swiped:)] autorelease]; | |
swipeUp.direction = UISwipeGestureRecognizerDirectionUp; | |
[self addGestureRecognizer:swipeUp]; | |
%orig; | |
} | |
%new -(void)presentAppShortcutMenu:(NSString*)bundleID { | |
SBApplication *application = [[%c(SBApplicationController) sharedInstance] applicationWithBundleIdentifier:bundleID]; | |
SBApplicationIcon *applicationIcon = [[%c(SBApplicationIcon) alloc] initWithApplication:application]; | |
SBIconView *iconView = [[%c(SBIconViewMap) homescreenMap] mappedIconViewForIcon:applicationIcon]; | |
[[%c(SBIconController) sharedInstance] _revealMenuForIconView:iconView presentImmediately:true]; | |
} | |
%new - (void)swiped:(UISwipeGestureRecognizer *)gesture { | |
[[%c(SBIconController) sharedInstance] _revealMenuForIconView:self presentImmediately:true]; | |
} | |
%end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
D: