iOSthemem0d

Untitled

Feb 1st, 2020
170
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @interface _WANoHighlightImageView : UIImageView
  2. @end
  3.  
  4. @interface WAMessageContainerView : UIView {
  5.   _WANoHighlightImageView*_bubbleImageView;
  6.   NSArray*_sliceViews;
  7. }
  8. @property (nonatomic,readonly) WAChatCellData *cellData;
  9. @property (nonatomic,readonly) NSArray *sliceViews;
  10. @property (nonatomic,readonly) WAMessage * message;
  11. - (id)audioSliceView;
  12. - (void)reloadSliceViews;
  13. - (void)reloadSlicesIfNeeded;
  14. @end
  15.  
  16. @interface WAMessageContainerSliceView : UIView
  17. @property (nonatomic,readonly) WAMessage *message;
  18. @property (nonatomic,readonly) WAChatCellData *cellData;
  19. @end
  20.  
  21.  
  22.  
  23.  
  24. %hook WAMessageContainerView
  25. - (void)updateBubbleImageView {
  26.   %orig;
  27.  
  28.  
  29.   if (enableColor) {
  30.     return;
  31.   }
  32.  
  33.   WAMessage *message = nil;
  34.   if ([self respondsToSelector:@selector(message)]) {
  35.     message = self.message;
  36.   } else if ([self respondsToSelector:@selector(cellData)]) {
  37.     message = self.cellData.message;
  38.   }
  39.  
  40.   _WANoHighlightImageView *customBubbleImageView;
  41.   object_getInstanceVariable(self, "_bubbleImageView");
  42.   if (enableColor) {
  43.     return;
  44.   }
  45.  
  46.   customBubbleImageView.image = [customBubbleImageView.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
  47.  
  48.   BOOL isAudioSliceView = NO;
  49.   if ([self respondsToSelector:@selector(audioSliceView)]) {
  50.     isAudioSliceView = [self audioSliceView] != nil;
  51.   } else if ([self.sliceViews count] > 0) {
  52.     isAudioSliceView = [self.sliceViews[0] isKindOfClass:%c(WAMessageAudioSliceView)];
  53.   }
  54.  
  55.   if (message.isFromMe) {
  56.     if (isAudioSliceView) {
  57.  
  58.       customBubbleImageView.tintColor = LCPParseColorString([CPSettings objectForKey:@"testColor1"], @"#FFFFFF");
  59.     } else {
  60.  
  61.       customBubbleImageView.tintColor = LCPParseColorString([CPSettings objectForKey:@"testColor2"], @"#FFFFFF");
  62.     }
  63.   } else if (!message.canBeForwarded) {
  64.  
  65.       customBubbleImageView.tintColor = LCPParseColorString([CPSettings objectForKey:@"testColor3"], @"#FFFFFF");
  66.   } else {
  67.     if (isAudioSliceView) {
  68.  
  69.       customBubbleImageView.tintColor = LCPParseColorString([CPSettings objectForKey:@"testColor4"], @"#FFFFFF");
  70.     } else {
  71.  
  72.       customBubbleImageView.tintColor = LCPParseColorString([CPSettings objectForKey:@"testColor5"], @"#FFFFFF");
  73.     }
  74.   }
  75. }
  76. %end
  77.  
  78.  
  79.  
  80.  
  81. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ERROR =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  82.  
  83.  
  84. ==> Compiling Tweak.xm (arm64)
  85. Tweak.xm:64:32: error: unknown type name 'WAChatCellData'
  86. @property (nonatomic,readonly) WAChatCellData *cellData;
  87.                                ^
  88. Tweak.xm:66:32: error: unknown type name 'WAMessage'
  89. @property (nonatomic,readonly) WAMessage * message;
  90.                                ^
  91. Tweak.xm:73:32: error: unknown type name 'WAMessage'
  92. @property (nonatomic,readonly) WAMessage *message;
  93.                                ^
  94. Tweak.xm:74:32: error: unknown type name 'WAChatCellData'
  95. @property (nonatomic,readonly) WAChatCellData *cellData;
  96.                                ^
  97. Tweak.xm:89:3: error: unknown type name 'WAMessage'
  98.   WAMessage *message = nil;
  99.   ^
  100. Tweak.xm:93:28: error: member reference base type 'int *' is not a structure or union
  101.     message = self.cellData.message;
  102.               ~~~~~~~~~~~~~^~~~~~~~
  103. Tweak.xm:97:3: error: no matching function for call to 'object_getInstanceVariable'
  104.   object_getInstanceVariable(self, "_bubbleImageView");
  105.   ^~~~~~~~~~~~~~~~~~~~~~~~~~
  106. /Users/dylan4char/theos/sdks/iPhoneOS13.0.sdk/usr/include/objc/runtime.h:264:1: note: candidate
  107.       function not viable: requires 3 arguments, but 2 were provided
  108. object_getInstanceVariable(id _Nullable obj, const char * _Nonnull name,
  109. ^
  110. 7 errors generated.
RAW Paste Data