Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @interface CCUIModuleCollectionViewController : UIViewController {
- NSDictionary *_moduleContainerViewByIdentifier;
- }
- @end
- @interface CCUIContentModuleContainerView : UIView {
- NSString *_moduleIdentifier;
- }
- @end
- @interface CCUIModularControlCenterViewController : UIViewController
- - (void)viewDidLoad;
- @end
- NSMutableString *allModuleNames = [NSMutableString new];
- %hook CCUIModularControlCenterViewController
- - (void)viewDidLoad {
- CCUIModuleCollectionViewController *mcvc = [CCUIModuleCollectionViewController sharedInstance];
- NSDictionary *moduleDictionary = MSHookIvar<NSDictionary *>(%c(CCUIModuleCollectionViewController), "_moduleContainerViewByIdentifier");
- for (NSString *key in moduleDictionary) {
- id val = moduleDictionary[key];
- [allModules appendString: [NSString stringWithFormat: @"%@\n", key]];
- }
- UILabel *yourLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 300, 200)];
- [yourLabel setTextColor:[UIColor blackColor]];
- [yourLabel setBackgroundColor:[UIColor redColor]];
- [yourLabel setText: allModules];
- [self.view addSubview: yourLabel];
- %orig;
- }
- %end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement