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

    • Mob Control v2.87.2 +7 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Mob Control By Voodoo
      Bundle ID: com.vincentb.MobControl
      iTunes Store Link: https://apps.apple.com/us/app/mob-control/id1562817072?uo=4


      Hack Features:
      - Unlimited Coins -> Earn or spend some.
      - Unlimited Skip'Its -> Earn or spend some.
      - Unlimited Stars -> Earn some.
      - Unlimited Bricks
      - Unlimited Earnt Bricks
      - Unlimited Cards -> Will increase instead of decrease.
      - No Card Requirement


      Jailbreak required hack(s): [Mod Menu Hack] Mob Control v2.78.0 +7 Cheats [ Unlimited Currencies ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 199 replies
    • Mob Control v2.87.2 +7 Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Mob Control By Voodoo
      Bundle ID: com.vincentb.MobControl
      iTunes Store Link: https://apps.apple.com/us/app/mob-control/id1562817072?uo=4


      Hack Features:
      - Unlimited Coins -> Earn or spend some.
      - Unlimited Skip'Its -> Earn or spend some.
      - Unlimited Stars -> Earn some.
      - Unlimited Bricks
      - Unlimited Earnt Bricks
      - Unlimited Cards -> Will increase instead of decrease.
      - No Card Requirement


      Non-Jailbroken & No Jailbreak required hack(s): [IPA Mod Menu] Mob Control v2.78.0 +7 Jailed Cheats [ Unlimited Currencies ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Like
      • 105 replies
    • Erythros Lite v24.02.25 +8 Jailed Cheats [ Unlimited Everything ]
      Modded/Hacked App: Erythros Lite By VLADYSLAV PAVLIV
      Bundle ID: com.keyneed.erythroslite
      App Store Link: https://apps.apple.com/us/app/erythros-lite/id6740181005?uo=4

       
       

      🤩 Hack Features

      - Unlimited Health
      - Unlimited Stamina
      - Unlimited Food
      - Unlimited Water
      - Unlimited Sickness
      - Unlimited Experience
      -- Premium Enabled
      -- Anti Ban [ Untested ]
      • 0 replies
    • Erythros Lite v24.02.25 +8 Cheats [ Unlimited Everything ]
      Modded/Hacked App: Erythros Lite By VLADYSLAV PAVLIV
      Bundle ID: com.keyneed.erythroslite
      App Store Link: https://apps.apple.com/us/app/erythros-lite/id6740181005?uo=4

       


      🤩 Hack Features

      - Unlimited Health
      - Unlimited Stamina
      - Unlimited Food
      - Unlimited Water
      - Unlimited Sickness
      - Unlimited Experience
      -- Premium Enabled
      -- Anti Ban [ Untested ]
      • 0 replies
    • Vampire Survivors v1.13.109 +4 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Vampire Survivors By Poncle
      Bundle ID: com.poncle.VampireSurvivors
      iTunes Store Link: https://apps.apple.com/us/app/vampire-survivors/id6444525702
       

      Hack Features:
      - Damage Multiplier
      - Defence Multiplier
      - Unlimited Coins -> Spend some.
      - All Weapons Unlocked -> Head over to Options and toggle the Sounds button.


      Jailbreak required hack(s): [Mod Menu Hack] Vampire Survivors v1.6.104 +5 Cheats [ Damage & Defence ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 115 replies
    • Vampire Survivors v1.13.109 +4 Cheats [ Damage & Defence ]
      Modded/Hacked App: Vampire Survivors By Poncle
      Bundle ID: com.poncle.VampireSurvivors
      iTunes Store Link: https://apps.apple.com/us/app/vampire-survivors/id6444525702
       

      Hack Features:
      - Damage Multiplier
      - Defence Multiplier
      - Unlimited Coins -> Spend some.
      - All Weapons Unlocked -> Head over to Options and toggle the Sounds button.


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Vampire Survivors v1.6.104 +3 Jailed Cheats [ God Mode ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 110 replies
    • Love Sparks: Make Me Blush v2.44.0 +2++ Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Love Sparks: Make Me Blush By SVEG MASHA, OOO
      Bundle ID: com.swagmasha.lovespark
      iTunes Store Link: https://apps.apple.com/us/app/love-sparks-make-me-blush/id1580105392?uo=4
       

      Hack Features:
      - Unlimited Gems -> Earn some.
      - VIP Enabled


      Jailbreak required hack(s): [Mod Menu Hack] Love Sparks: My Secret Fantasy v2.17.0 +2 Cheats [ Unlimited Gems ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 887 replies
    • Love Sparks: Make Me Blush v2.44.0 +2++ Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Love Sparks: Make Me Blush By SVEG MASHA, OOO
      Bundle ID: com.swagmasha.lovespark
      iTunes Store Link: https://apps.apple.com/us/app/love-sparks-make-me-blush/id1580105392?uo=4
       

      Hack Features:
      - Unlimited Gems -> Earn some.
      - VIP Enabled


      Non-Jailbroken & No Jailbreak required hack(s): [Non-Jailbroken Hack] Love Sparks: My Secret Fantasy v2.17.0 +3 Jailed Cheats [ Unlimited Gems ] - Free Non-Jailbroken IPA Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 388 replies
    • Whispers - Interactive Stories v2.2.9 +2 Jailed Cheats [ Free Choices ]
      Modded/Hacked App: Whispers: Interactive Stories By GAMEHAUS LIMITED
      Bundle ID: com.twincat.stories
      iTunes Store Link: https://apps.apple.com/us/app/whispers-interactive-stories/id1546336250
       

      Hack Features:
      - All Chapters Unlocked
      - Free Premium Choices


      Jailbreak required hack(s): [Mod Menu Hack] Whispers: Interactive Stories v1.4.9 +2 Cheats [ Free Choices ] - Free Jailbroken Cydia Cheats - iOSGods
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 277 replies
    • Whispers - Interactive Stories v2.2.9 +2 Cheats [ Free Choices ]
      Modded/Hacked App: Whispers: Interactive Stories By GAMEHAUS LIMITED
      Bundle ID: com.twincat.stories
      iTunes Store Link: https://apps.apple.com/us/app/whispers-interactive-stories/id1546336250
       

      Hack Features:
      - All Chapters Unlocked
      - Free Premium Choices


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 172 replies
    • MeChat - Interactive Stories v4.33.1 +2 Jailed Cheats [ Unlimited Gems ]
      Modded/Hacked App: MeChat - Interactive Stories By IMPONILOX LIMITED
      Bundle ID: world.playme.mechat
      App Store Link: https://apps.apple.com/us/app/mechat-interactive-stories/id1536157979?uo=4

       

      📌 Mod Requirements

      - Non-Jailbroken/Jailed or Jailbroken iPhone or iPad.
      - Sideloadly or alternatives.
      - Computer running Windows/macOS/Linux with iTunes installed.

       

      🤩 Hack Features

      - Unlimited Gems -> Will increase instead of decrease.

      VIP
      - Unlimited Gems -> Earn some then disable this feature. DO NOT SPEND ANY GEMS WHILST THIS FEATURE IS ENABLED!
      • 767 replies
    • MeChat - Interactive Stories v4.33.1 +2 Cheats [ Unlimited Gems ]
      Modded/Hacked App: MeChat - Interactive Stories By IMPONILOX LIMITED
      Bundle ID: world.playme.mechat
      App Store Link: https://apps.apple.com/us/app/mechat-interactive-stories/id1536157979?uo=4

       

      📌 Mod Requirements

      - Jailbroken iPhone or iPad.
      - iGameGod / Filza / iMazing.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak (from Sileo, Cydia or Zebra).

       

      🤩 Hack Features

      - Unlimited Gems -> Will increase instead of decrease.

      VIP
      - Unlimited Gems -> Earn some then disable this feature. DO NOT SPEND ANY GEMS WHILST THIS FEATURE IS ENABLED!
      • 307 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