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:@"EricLegend_336@talk.kik.com"])
		
		//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
  On 5/17/2016 at 8:30 PM, niro said:

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:@"EricLegend_336@talk.kik.com"])
		
		//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

    • Tsukuyomi: The Divine Hunter v1.0.6 +3 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Tsukuyomi: The Divine Hunter By COLOPL, Inc.
      Bundle ID: jp.colopl.mask
      App Store Link: https://apps.apple.com/us/app/tsukuyomi-the-divine-hunter/id6505051119?uo=4

       
       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
        • Thanks
      • 9 replies
    • Tsukuyomi: The Divine Hunter v1.0.6 +3 Cheats [ Damage & Defence ]
      Modded/Hacked App: Tsukuyomi: The Divine Hunter By COLOPL, Inc.
      Bundle ID: jp.colopl.mask
      App Store Link: https://apps.apple.com/us/app/tsukuyomi-the-divine-hunter/id6505051119?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
        • Thanks
        • Like
      • 6 replies
    • Pal Go: Tower Defense TD v0.3.76 [+7 Cheats]
      Modded/Hacked App: Pal Go: Tower Defense TD By Playwind Ltd
      Bundle ID: com.playwindgames.freedefender
      iTunes Store Link: https://apps.apple.com/us/app/pal-go-tower-defense-td/id6479316663?uo=4


       

      🚀 Hack Features

      - [VIP] Freeze Currency (Currency will not decrease when used)

      - [VIP] Currency Always Enough (Buy even when you don't have enough currency)

      - [Free] Higher Recruit Energy (Gives 500 Recruit Energy Every Wave)

      - [Free] Always Can Drag Hero

      - [Free] Skip Ads

      - [Free] No Attack Cooldown

      - [Free] Global Speed Multiplier (Enable Inside Battle)

       

      Warning


      Do not use on main account. There is a chance of ban. Not responsible for any bans.

       


      🍏 For Non-Jailbroken & No Jailbreak required hacks: https://iosgods.com/forum/79-no-jailbreak-section/
      🤖 Modded Android APK(s): https://iosgods.com/forum/68-android-section/
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 48 replies
    • Pal Go: Tower Defense TD v0.3.76 [+7 Jailed Cheats]
      Modded/Hacked App: Pal Go: Tower Defense TD By Playwind Ltd
      Bundle ID: com.playwindgames.freedefender
      iTunes Store Link: https://apps.apple.com/us/app/pal-go-tower-defense-td/id6479316663?uo=4


       

      Hack Features

      - [VIP] Freeze Currency (Currency will not decrease when used)

      - [VIP] Currency Always Enough (Buy even when you don't have enough currency)

      - [Free] Higher Recruit Energy (Gives 500 Recruit Energy Every Wave)

      - [Free] Always Can Drag Hero

      - [Free] Skip Ads

      - [Free] No Attack Cooldown

      - [Free] Global Speed Multiplier (Enable Inside Battle)

       

      Warning


      Do not use on main account. There is a chance of ban. Not responsible for any bans.

       

      Jailbreak required iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      Modded Android APKs: https://iosgods.com/forum/68-android-section/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 72 replies
    • Obsidian Knight RPG v1.100.9 [+3 Jailed Cheats]
      Modded/Hacked App: Obsidian Knight RPG By ActFirst Games AB
      Bundle ID: com.actfirstgames.obsidianknight
      iTunes Store Link: https://apps.apple.com/us/app/obsidian-knight-rpg/id6505061490?uo=4



      🚀 Hack Features

      - Unlimited Currency
      - God Mode / Never Die
      - High Damage / OHK
        • Informative
        • Haha
        • Thanks
        • Winner
        • Like
      • 19 replies
    • Obsidian Knight RPG v1.100.9 [+3 Cheats]
      Modded/Hacked App: Obsidian Knight RPG By ActFirst Games AB
      Bundle ID: com.actfirstgames.obsidianknight
      iTunes Store Link: https://apps.apple.com/us/app/obsidian-knight-rpg/id6505061490?uo=4

       

      🚀 Hack Features

      - Unlimited Currency
      - God Mode / Never Die
      - High Damage / OHK
        • Agree
        • Haha
        • Winner
        • Like
      • 25 replies
    • Rupture: Immortal Slasher v0.15.3 [+3 Cheats]
      Modded/Hacked App: Rupture: Immortal Slasher By ALEKSEI KLIMOV
      Bundle ID: com.GOLEM.Immortal
      iTunes Store Link: https://apps.apple.com/us/app/rupture-immortal-slasher/id6738378630?uo=4

       

      🤩 Hack Features

      - God Mode/Never Die
      - Unlimited Currency (Add 50k every time you spend)
      - Always Can Upgrade Equipments

       
        • Agree
        • Winner
        • Like
      • 9 replies
    • Rupture: Immortal Slasher v0.15.3 [+3 Jailed Cheats]
      Modded/Hacked App: Rupture: Immortal Slasher By ALEKSEI KLIMOV
      Bundle ID: com.GOLEM.Immortal
      iTunes Store Link: https://apps.apple.com/us/app/rupture-immortal-slasher/id6738378630?uo=4

       

      🚀 Hack Features

      - God Mode/Never Die
      - Unlimited Currency (Add 50k every time you spend)
      - Always Can Upgrade Equipments


      🍏 Jailbreak iOS hacks: https://iosgods.com/forum/5-game-cheats-hack-requests/
      🤖 Modded Android APKs: https://iosgods.com/forum/68-android-section/
        • Informative
        • Thanks
        • Winner
        • Like
      • 18 replies
    • Go Go Werewolf! v1.3.2 [+3 Jailed Cheats]
      Modded/Hacked App: Go Go Werewolf! By Dejaime Antonio de Oliveira Neto
      Bundle ID: productions.artcode.ggw
      iTunes Store Link: https://apps.apple.com/us/app/go-go-werewolf/id6739493341?uo=4



      🤩 Hack Features

      - Never Die
      - Free Item Upgrade
      - Unlimited Coins (Enable and Finish Stage)
        • Like
      • 8 replies
    • Go Go Werewolf! v1.3.2 [+3 Cheats]
      Modded/Hacked App: Go Go Werewolf! By Dejaime Antonio de Oliveira Neto
      Bundle ID: productions.artcode.ggw
      iTunes Store Link: https://apps.apple.com/us/app/go-go-werewolf/id6739493341?uo=4


      🤩 Hack Features

      - Never Die
      - Free Item Upgrade
      - Unlimited Coins (Enable and Finish Stage)
        • Agree
        • Winner
        • Like
      • 4 replies
    • Mafia Empire: Crime Tycoon v1.7.1 Cheat Menu [+10 Cheats]
      Modded/Hacked App: Mafia Empire: Crime Tycoon By PINPIN TEAM SARL
      Bundle ID: mafia.empire.tycoon
      App Store Link: https://apps.apple.com/us/app/mafia-empire-crime-tycoon/id6738845139?uo=4



      🤩 Hack Features

      - Cheat Menu (Enable and Cheat Menu Will Appear)
        • Like
      • 8 replies
    • Mafia Empire: Crime Tycoon v1.7.1 Cheat Menu [+10 Jailed Cheats]
      Modded/Hacked App: Mafia Empire: Crime Tycoon By PINPIN TEAM SARL
      Bundle ID: mafia.empire.tycoon
      App Store Link: https://apps.apple.com/us/app/mafia-empire-crime-tycoon/id6738845139?uo=4



      🤩 Hack Features

      - Cheat Menu (Enable and Cheat Menu Will Appear)
        • Winner
        • Like
      • 5 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