Jump to content

[Obj-C] Does this look like it makes any sense


Go to solution Solved by Guest,

4 posts in this topic

Recommended Posts

Posted (edited)

Haven't tested this, I'm not sure if I'm fully understanding the code I wrote but I tried explaining what I do know!

Please feedback helps me a lot!

Thanks!

 

//Text Color Per Username (NOT TESTED)


//'Reaching' = Hooking, kind of, we are pulling functions from other classes
//so we can achieve what we are trying to do (to my understanding)

//'Reaching' into the other classes so they work with HybridSmileyLabel
//even though they aren't in the class 'HybridSmileyLabel'
@interface HybridSmileyLabel : NSObject

//From the class XMPPJID
- (XMPPJID *)userJid;

//From the class KikUser
- (KikUser *)username;
- (KikUser *)user;

//Closing the interface with an @end (to my understanding it is like the %end, but I may be wrong)
@end


//Hooking into the class that deals with the message color
%hook HybridSmileyLabel

//This is the function that deals with the specific text color
//We put UIColor * as the id because we are dealing with color
//The word after UIColor * can be anything, in this case I put color, but it could be arg1, eric, niro, etc
-(void)setTextColor:(UIColor *)color {
	
	//'Reaching' into the KikUser Class and is searching if the username is nooneloves me (niro)
	if([self.user.username isEqualToString:@"noonelovesme"])
		
		//If it is equal it sets the color to a nice blue
		color = [UIColor colorWithRed:0.43 green:0.62 blue:0.92 alpha:1.0];
	
	//Instead of 'reaching' into KikUser, it is 'Reaching' into XMPPJID to see if the jid is equal to yours (EricLegend)
	if([self.userJid.user isEqualToString:@"[email protected]"])
		
		//If it is equal it sets the color to a dark red
		color =	[UIColor colorWithRed:0.60 green:0.00 blue:0.00 alpha:1.0];
	
	//Returns all other possibilities to the original color
	return %orig;
}

//Closing the hook and all the modifications
%end
Updated by niro
  • Solution
Posted

Haven't tested this, I'm not sure if I'm fully understanding the code I wrote but I tried explaining what I do know!

Please feedback helps me a lot!

Thanks!

//Text Color Per Username (NOT TESTED)


//'Reaching' = Hooking, kind of, we are pulling functions from other classes
//so we can achieve what we are trying to do (to my understanding)

//'Reaching' into the other classes so they work with HybridSmileyLabel
//even though they aren't in the class 'HybridSmileyLabel'
@interface HybridSmileyLabel : NSObject

//From the class XMPPJID
- (XMPPJID *)userJid;

//From the class KikUser
- (KikUser *)username;
- (KikUser *)user;

//Closing the interface with an @end (to my understanding it is like the %end, but I may be wrong)
@end


//Hooking into the class that deals with the message color
%hook HybridSmileyLabel

//This is the function that deals with the specific text color
//We put UIColor * as the id because we are dealing with color
//The word after UIColor * can be anything, in this case I put color, but it could be arg1, eric, niro, etc
-(void)setTextColor:(UIColor *)color {
	
	//'Reaching' into the KikUser Class and is searching if the username is nooneloves me (niro)
	if([self.user.username isEqualToString:@"noonelovesme"])
		
		//If it is equal it sets the color to a nice blue
		color = [UIColor colorWithRed:0.43 green:0.62 blue:0.92 alpha:1.0];
	
	//Instead of 'reaching' into KikUser, it is 'Reaching' into XMPPJID to see if the jid is equal to yours (EricLegend)
	if([self.userJid.user isEqualToString:@"[email protected]"])
		
		//If it is equal it sets the color to a dark red
		color =	[UIColor colorWithRed:0.60 green:0.00 blue:0.00 alpha:1.0];
	
	//Returns all other possibilities to the original color
	return %orig;
}

//Closing the hook and all the modifications
%end

Use MSHookIvar to hook the JID or the username from another class, and then put that into a global variable so all methods can use it. Then in the setTextColor, check for that username and then set the color accordingly

 

That's what I would do

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Our picks

    • Gear Truck! v1.0.23 [+3 Jailed Cheats]
      Modded/Hacked App: Gear Truck! By treeplla Inc.
      Bundle ID: com.tree.hybrid.geartank
      App Store Link: https://apps.apple.com/us/app/gear-truck/id6747216965?uo=4



      🤩 Hack Features

      - Never Die
      - High Wheel Speed Gain
      - One Hit Kill
        • Winner
        • Like
      • 5 replies
    • Gear Truck! v1.0.23 [+3 Cheats]
      Modded/Hacked App: Gear Truck! By treeplla Inc.
      Bundle ID: com.tree.hybrid.geartank
      App Store Link: https://apps.apple.com/us/app/gear-truck/id6747216965?uo=4



      🤩 Hack Features

      - Never Die
      - High Wheel Speed Gain
      - One Hit Kill
       
        • Haha
        • Thanks
        • Winner
        • Like
      • 5 replies
    • Soul Huntress: Dungeon Crawler v1.1.4 [+3 Jailed Cheats]
      Modded/Hacked App: Soul Huntress: Dungeon Crawler By Panthera Joint Stock Company
      Bundle ID: com.pantheraplay.soulhuntress
      App Store Link: https://apps.apple.com/ph/app/soul-huntress-dungeon-crawler/id6743422594?uo=4


      🤩 Hack Features

      - Never Die
      - Unlimited Currency (Always Will Increase Spend)
      - Always Can Use Items (Even when has cooldown)
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 45 replies
    • Soul Huntress: Dungeon Crawler v1.1.4 [+3 Cheats]
      Modded/Hacked App: Soul Huntress: Dungeon Crawler By Panthera Joint Stock Company
      Bundle ID: com.pantheraplay.soulhuntress
      App Store Link: https://apps.apple.com/ph/app/soul-huntress-dungeon-crawler/id6743422594?uo=4



      🤩 Hack Features

      - Never Die
      - Unlimited Currency (Always Will Increase Spend)
      - Always Can Use Items (Even when has cooldown)
        • Agree
        • Thanks
        • Winner
        • Like
      • 45 replies
    • Cannon Heroes X v1.2.27 [+2 Jailed Cheats]
      Modded/Hacked App: Cannon Heroes X By Zego Global Pte Ltd
      Bundle ID: com.ig.cannon.heroes
      App Store Link: https://apps.apple.com/us/app/cannon-heroes-x/id6744356657?uo=4



      🤩 Hack Features

      - Free IAP
      - Never Die
      - Debug Menu (Enable once then restart game. Enable again you'll see debug menu)
        • Winner
        • Like
      • 10 replies
    • Cannon Heroes X v1.2.27 [+2 Cheats]
      Modded/Hacked App: Cannon Heroes X By Zego Global Pte Ltd
      Bundle ID: com.ig.cannon.heroes
      App Store Link: https://apps.apple.com/us/app/cannon-heroes-x/id6744356657?uo=4



      🤩 Hack Features

      - Free IAP
      - Never Die
      - Debug Menu (Enable once then restart game. Enable again you'll see debug menu)
       
        • Winner
        • Like
      • 7 replies
    • Slay Quest v1.3.13 [+3 Cheats]
      Modded/Hacked App: Slay Quest By Quest Lab Games Korlatolt Felelossegu Tarsasag
      Bundle ID: com.questlab.slayquest
      App Store Link: https://apps.apple.com/us/app/slay-quest/id6670221918?uo=4



      🤩 Hack Features

      - Unlimited Resources
      - Never Die
      - One Hit Kill
       
        • Agree
        • Thanks
        • Winner
        • Like
      • 8 replies
    • Slay Quest v1.3.13 [+3 Jailed Cheats]
      Modded/Hacked App: Slay Quest By Quest Lab Games Korlatolt Felelossegu Tarsasag
      Bundle ID: com.questlab.slayquest
      App Store Link: https://apps.apple.com/us/app/slay-quest/id6670221918?uo=4

       

      🤩 Hack Features

      - Unlimited Resources
      - Never Die
      - One Hit Kill
        • Like
      • 6 replies
    • Endless Wander - Roguelike RPG v3.0.4 [+3 Jailed Cheats]
      Modded/Hacked App: Endless Wander - Roguelike RPG By First Pick Studios
      Bundle ID: com.FirstPickStudios.Endless-Wander
      App Store Link: https://apps.apple.com/us/app/endless-wander-roguelike-rpg/id6473157705?uo=4



      🤩 Hack Features

      - Never Die
      - Always Enough Currency
      - Unlimited Currency (Will Always Increase)
        • Agree
        • Thanks
        • Winner
        • Like
      • 22 replies
    • Endless Wander - Roguelike RPG v3.0.4 [+3 Cheats]
      Modded/Hacked App: Endless Wander - Roguelike RPG By First Pick Studios
      Bundle ID: com.FirstPickStudios.Endless-Wander
      App Store Link: https://apps.apple.com/us/app/endless-wander-roguelike-rpg/id6473157705?uo=4



      🤩 Hack Features

      - Never Die
      - Always Enough Currency
      - Unlimited Currency (Will Always Increase)
       
        • Agree
        • Winner
        • Like
      • 17 replies
    • Bounce Defense v1.10.2 [+5 Jailed Cheats]
      Modded/Hacked App: Bounce Defense By Voodoo
      Bundle ID: com.minigamelab.bouncedefense
      App Store Link: https://apps.apple.com/us/app/bounce-defense/id6740627201?uo=4



      🤩 Hack Features

      - Add Currency
      - Add Battle Currency (Enable inside battle)
      - Never Die
      - Unlock All Towers
      - Unlimited Tower Cards
        • Informative
        • Thanks
        • Winner
        • Like
      • 22 replies
    • Bounce Defense v1.10.2 [+5 Cheats]
      Modded/Hacked App: Bounce Defense By Voodoo
      Bundle ID: com.minigamelab.bouncedefense
      App Store Link: https://apps.apple.com/us/app/bounce-defense/id6740627201?uo=4



      🤩 Hack Features

      - Add Currency
      - Add Battle Currency (Enable inside battle)
      - Never Die
      - Unlock All Towers
      - Unlimited Tower Cards
        • Agree
        • Thanks
        • Like
      • 15 replies
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines