Advertisement
Guest User

Theos first try

a guest
Jan 18th, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @interface CCUIModuleCollectionViewController : UIViewController {
  2.     NSDictionary *_moduleContainerViewByIdentifier;
  3. }
  4. @end
  5.  
  6.  
  7. @interface CCUIContentModuleContainerView : UIView {
  8.     NSString *_moduleIdentifier;
  9. }
  10. @end
  11.  
  12.  
  13. @interface CCUIModularControlCenterViewController : UIViewController
  14. - (void)viewDidLoad;
  15. @end
  16.  
  17.  
  18. NSMutableString *allModuleNames = [NSMutableString new];
  19.  
  20.  
  21. %hook CCUIModularControlCenterViewController
  22. - (void)viewDidLoad {
  23.  
  24.     CCUIModuleCollectionViewController *mcvc = [CCUIModuleCollectionViewController sharedInstance];
  25.     NSDictionary *moduleDictionary = MSHookIvar<NSDictionary *>(%c(CCUIModuleCollectionViewController), "_moduleContainerViewByIdentifier");
  26.     for (NSString *key in moduleDictionary) {
  27.         id val = moduleDictionary[key];
  28.         [allModules appendString: [NSString stringWithFormat: @"%@\n", key]];
  29.     }
  30.  
  31.     UILabel *yourLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 300, 200)];
  32.  
  33.     [yourLabel setTextColor:[UIColor blackColor]];
  34.     [yourLabel setBackgroundColor:[UIColor redColor]];
  35.     [yourLabel setText: allModules];
  36.     [self.view addSubview: yourLabel];
  37.     %orig;
  38. }
  39. %end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement