Skip to content

Instantly share code, notes, and snippets.

@jontelang
Created March 17, 2013 06:21
Show Gist options
  • Save jontelang/5180373 to your computer and use it in GitHub Desktop.
Save jontelang/5180373 to your computer and use it in GitHub Desktop.
ssss
%hook SBUIController
@interface SBIconController : NSObject
+(id)sharedInstance;
@end
@interface SBIconListView : UIView
@end
@interface SBIconListModel : NSObject
-(id)icons;
@end
@interface SBApplicationIcon
-(id)displayName;
-(void)setBadge:(id)arg;
@end
+(id)sharedInstance{
id s = %orig;
SBIconController *sbic = [objc_getClass("SBIconController") sharedInstance];
NSMutableArray *arr = MSHookIvar<NSMutableArray *>(sbic, "_rootIconLists");
if( [arr count] > 0 )
{
SBIconListView *ilv = [arr objectAtIndex:0];
SBIconListModel *model = MSHookIvar<SBIconListModel *>(ilv, "_model");
for(SBApplicationIcon *icon in [model icons])
{
// ...
}
}
return s;
}
%end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment