Skip to content

Instantly share code, notes, and snippets.

@ninjaprawn
Last active August 10, 2016 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ninjaprawn/15507948d0e3dff993f3 to your computer and use it in GitHub Desktop.
Save ninjaprawn/15507948d0e3dff993f3 to your computer and use it in GitHub Desktop.
it was greeny D:
@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
@greenywd
Copy link

D:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment