Jump to content

Changing UISwitch Colours in Preference Bundles


Joka

18 posts in this topic

Recommended Posts

Updated

I know Preference Bundles are pretty dead to use in 2019 but they're useful for tweak developers or those that prefer them over mod menu's

I only just learnt how to do this, but in order to change a UISwitch color (when enabled - default is green), you need to edit 2 files within your Preference Bundle.

The first file to edit is the tweak.mm. This file is located at /private/var/mobile/tweakproject/tweakproject/.

Open the file and paste this at the top of it:

@interface PSSwitchTableCell : PSControlTableCell
- (id)initWithStyle:(int)style reuseIdentifier:(id)identifier specifier:(id)specifier;
@end
 
@interface SRSwitchTableCell : PSSwitchTableCell
@end
 
@implementation SRSwitchTableCell
 
-(id)initWithStyle:(int)style reuseIdentifier:(id)identifier specifier:(id)specifier {
 
    self = [super initWithStyle:style reuseIdentifier:identifier specifier:specifier];
   
if (self) {
        [((UISwitch *)[self control]) setOnTintColor:[UIColor blackColor]]; // Change the colour of the ON state UISwitch here
 
    }
    return self;
}
 
@end

So you should have something like this:

Ev9wVOP.png

Next, open up the tweakproject.xm file which is located at /private/var/mobile/hidephonetabs/hidephonetabs/Resources. (The "tweakproject.xm" file will be called whateveryounamedtheproject.xm basically,  in case you get confused.)

Open it up and you'll see something like this:

uWmwAcz.png

All you need to do is add this code to the top of each PSSwitchCell you have in your .xm file:

<key>cellClass</key> 
<string>SRSwitchTableCell</string>

So it should look something like this:

FoEOGUW.png

Compile the project and go test!

Results:

RaHQP4O.png

 

More information:

If you would like to use custom hex colours instead, go to https://www.uicolor.xyz/, type in the hex colour you'd like to use and then copy and paste the Objective-C code in the UIColor box.

You can also customise the actual button of the UISwitch and the border of the switch itself by adding either of these below the [((UISwitch *)[self control]):

[((UISwitch *)[self control]) setThumbTintColor:[UIColor colorWithRed:0.11 green:0.22 blue:0.20 alpha:1.0]]; // Change the colour of the circle UISwitch button 
[((UISwitch *)[self control]) setTintColor:[UIColor colorWithRed:0.56 green:0.00 blue:0.00 alpha:1.0]]; // Change the colour of the border of the UISwitch

 

Posted
Just now, Joey said:

can’t you just use the existing framework for this

UIKit?

Posted
Just now, Joey said:

no there’s some framework for creating colorized patcher

Ah no idea. If you find it, PM me.

Posted

Added information on how to add custom hex colours to a UISwitch.

More information added on how to change the colour of the UISwitch button and the UISwitch border.

Posted
On 3/29/2019 at 12:27 AM, Joka said:

Added information on how to add custom hex colours to a UISwitch.

More information added on how to change the colour of the UISwitch button and the UISwitch border.

Thanks dad!  :)

Archived

This topic is now archived and is closed to further replies.

  • Our picks

    • Gossip Harbor®: Merge & Story v3.81.0 [+2 Jailed Cheats]
      Modded/Hacked App: Gossip Harbor®: Merge & Story By Microfun Limited
      Bundle ID: com.mergegame.icookie
      App Store Link: https://apps.apple.com/us/app/gossip-harbor-merge-story/id1623318294?uo=4



      🤩 Hack Features

      - Unlimited Energy
      - Freeze Currency (Never Decrease)
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 67 replies
    • Gossip Harbor®: Merge & Story v3.81.0 [+2 Cheats]
      Modded/Hacked App: Gossip Harbor®: Merge & Story By Microfun Limited
      Bundle ID: com.mergegame.icookie
      App Store Link: https://apps.apple.com/us/app/gossip-harbor-merge-story/id1623318294?uo=4



      🤩 Hack Features

      - Unlimited Energy
      - Freeze Currency (Never Decrease)
       
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 28 replies
    • Knight Maidens: Idle RPG v1.7 Jailed Cheats +6
      Modded/Hacked App: Knight Maidens: Idle RPG By Yes Games Co., Ltd.
      Bundle ID: com.yesgames.knightmaidens
      App Store Link: https://apps.apple.com/us/app/knight-maidens-idle-rpg/id6755811996?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

      - God Mode
      - Multiply Attack
      - One Hit Kill
      - Freeze Gold when Pray
      - Freeze Gems
      - PREMIUM

       

      ⬇️ iOS Hack Download IPA Link: https://iosgods.com/topic/204353-knight-maidens-idle-rpg-v17-jailed-cheats-6/
        • Winner
      • 1 reply
    • Project Makeover v2.130.1 +4 Jailed Cheats [ Unlimited Currencies ]
      Modded/Hacked App: Project Makeover By Magic Tavern, Inc.
      Bundle ID: com.bgg.jump
      App Store Link: https://apps.apple.com/us/app/project-makeover/id1483058899?uo=4

       
       

      🤩 Hack Features

      - Unlimited Cash
      - Unlimited Coins
      - Unlimited Gems
      - Unlimited Lives

      This hack was made by @Cashlaz. Give him all your love & appreciation! ❤️
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 44 replies
    • Dawn of Zombies: Survival Game v2.274.3032 +8 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Dawn of Zombies: Survival Game By VISTREX LIMITED
      Bundle ID: com.survival.dawn
      iTunes Store Link: https://apps.apple.com/us/app/dawn-of-zombies-survival-game/id1465954247?uo=4


      Hack Features:
      - Damage Multiplier
      - Defence Multiplier
      - Speed Multiplier
      - Split Hack
      - No Energy Cost
      - Max Level -> Earn some XP.


      Jailbreak required hack(s): [Mod Menu Hack] Dawn of Zombies: Survival Game v2.250 +6 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/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 315 replies
    • Lost Sword v1.448.1 +1 Jailed Cheat [ Auto Win ]
      Modded/Hacked App: Lost Sword By Wemade Connect Co., Ltd.
      Bundle ID: com.wemadeconnect.ios.lostdgl
      App Store Link: https://apps.apple.com/us/app/lost-sword/id6482099823?uo=4

       
       

      🤩 Hack Features

      - Auto Win
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 18 replies
    • Zerowake GATES : BL RPG v1.5.1 +3 Jailed Cheats [ Damage & Defence ]
      Modded/Hacked App: Zerowake GATES : BL RPG By Storytaco.inc
      Bundle ID: com.storytaco.p33client
      App Store Link: https://apps.apple.com/us/app/zerowake-gates-bl-rpg/id6747482230?uo=4

       


      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
        • Agree
        • Like
      • 10 replies
    • (Heaven Burns Red Japan) ヘブンバーンズレッド v6.0.1 +2 Cheats
      Mod APK Game Name: ヘブンバーンズレッド By WFS, Inc.
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.heavenburnsred

       

      🤩 Hack Features

      - Damage Multiplier
      - Defense Multiplier

       

      ⬇️ Android Mod APK Download Link


      Hidden Content

      Download Modded APK







       

      📖 Android Installation Instructions

      STEP 1: Download the modded APK file from the link above using your preferred Android browser or download manager.
      STEP 2: Once the download is complete, open your file manager and locate the downloaded .apk file (usually in the Downloads folder).
      STEP 3: Tap the APK file, then select Install. If prompted, enable Install from Unknown Sources in your device settings.
      STEP 3A: If the mod includes an OBB file, extract it if it’s inside an archive. Then move the folder to: /Android/obb/
      STEP 3B: If the mod includes a DATA file, extract it if it’s archived. Then move the folder to: /Android/data/
      STEP 4: Once installed, open the game and toggle your desired cheats & features through the APK mod menu. Enjoy!

       

      NOTE: If you have any questions or issues, read our Frequently Asked Questions topic. If you still need help, post your issue below and we’ll assist you as soon as possible. If the mod works for you, please share your feedback to help other members!

       

      🙌 Credits

      - AlyssaX64

       

      📷 Cheat Video/Screenshots

      N/A

       

       iOS & iPadOS App Hacks
      If you’re looking for Non-Jailbroken & No Jailbreak required iOS IPA hacks, visit the iOS Game Cheats & Hacks or the iOSGods App for a variety of modded games and apps for non-jailbroken iOS devices.
      • 0 replies
    • Legend of Avatar v1.11.1 Jailed Cheats +3
      Modded/Hacked App: Legend of Avatar By billionairegames
      Bundle ID: com.billionairegames.serares
      App Store Link: https://apps.apple.com/us/app/legend-of-avatar/id6746192853?uo=4

       
       

      🤩 Hack Features

      - Damage Multiplier
      - Defence Multiplier
      - God Mode
        • Informative
        • Agree
        • Thanks
        • Winner
        • Like
      • 171 replies
    • Disney Magic Kingdoms Cheats v11.2.0 +1
      Modded/Hacked App: Disney Magic Kingdoms By Gameloft
      Bundle ID: com.gameloft.disneykingdom
      iTunes Store Link: https://apps.apple.com/us/app/disney-magic-kingdoms/id731592936?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

      - Free Store ( not Free iAP )

       

      Non-Jailbroken Hack: https://iosgods.com/topic/184748-disney-magic-kingdoms-v1012-jailed-cheats-1/

       

      ⬇️ iOS Hack Download Link: https://iosgods.com/topic/147877-disney-magic-kingdoms-cheats-v1020-1/
        • Informative
        • Agree
        • Haha
        • Thanks
        • Winner
        • Like
      • 406 replies
    • Dark Tower:Tactical RPG v1.1.1 +2 Jailed Cheats
      Modded/Hacked App: Dark Tower:Tactical RPG By Rawhand. Inc
      Bundle ID: com.rawhand.darktower
      App Store Link: https://apps.apple.com/us/app/dark-tower-tactical-rpg/id6748525811?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

      - Damage Multiplier
      - Defense Multiplier

       

      ⬇️ iOS Hack Download IPA Link


      Hidden Content

      Download via the iOSGods App







       

      📖 PC Installation Instructions

      STEP 1: Download the pre-hacked .IPA file from the link above to your computer. To download from the iOSGods App, see our iOSGods App IPA Download Tutorial which includes a video example.
      STEP 2: Download Sideloadly and install it on your Windows or Mac.
      STEP 3: Open Sideloadly on your computer, connect your iOS device, and wait until your device name appears in Sideloadly.
      STEP 4: Once your iDevice is recognized, drag the modded .IPA file you downloaded and drop it into the Sideloadly application.
      STEP 5: Enter your Apple Account email, then press “Start.” You’ll then be asked to enter your password. Go ahead and provide the required information.
      STEP 6: Wait for Sideloadly to finish sideloading/installing the hacked IPA. If there are issues during installation, please read the note below.
      STEP 7: Once the installation is complete and you see the app on your Home Screen, you will need to go to Settings -> General -> Profiles / VPN & Device Management. Once there, tap on the email you entered from step 6, and then tap on 'Trust [email protected]'.
      STEP 8: Now go to your Home Screen and open the newly installed app and everything should work fine. You may need to follow further per app instructions inside the hack's popup in-game.

      NOTE: iOS/iPadOS 16 and later, you must enable Developer Mode. For free Apple Developer accounts, you will need to repeat this process every 7 days. If you have any questions or problems, read our Sideloadly FAQ section of the topic and if you don't find a solution, please post your issue below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.

       

      🙌 Credits

      - AlyssaX64

       

      📷 Cheat Video/Screenshots

      N/A
        • Informative
        • Agree
        • Like
      • 28 replies
    • Transcender : Idle RPG v1.9.9 +3 Cheats
      Mod APK Game Name: Transcender : Idle RPG By Rookie Project Co., Ltd.
      Rooted Device: Not Required.
      Google Play Store Link: https://play.google.com/store/apps/details?id=com.playgames.transcender

       

      🤩 Hack Features

      - Damage Multiplier
      - Never Die
      - Guest Login

       

      ⬇️ Android Mod APK Download Link


      Hidden Content

      Download Modded APK







       

      📖 Android Installation Instructions

      STEP 1: Download the modded APK file from the link above using your preferred Android browser or download manager.
      STEP 2: Once the download is complete, open your file manager and locate the downloaded .apk file (usually in the Downloads folder).
      STEP 3: Tap the APK file, then select Install. If prompted, enable Install from Unknown Sources in your device settings.
      STEP 3A: If the mod includes an OBB file, extract it if it’s inside an archive. Then move the folder to: /Android/obb/
      STEP 3B: If the mod includes a DATA file, extract it if it’s archived. Then move the folder to: /Android/data/
      STEP 4: Once installed, open the game and toggle your desired cheats & features through the APK mod menu. Enjoy!

       

      NOTE: If you have any questions or issues, read our Frequently Asked Questions topic. If you still need help, post your issue below and we’ll assist you as soon as possible. If the mod works for you, please share your feedback to help other members!

       

      🙌 Credits

      - AlyssaX64

       

      📷 Cheat Video/Screenshots

      N/A

       

       iOS & iPadOS App Hacks
      If you’re looking for Non-Jailbroken & No Jailbreak required iOS IPA hacks, visit the iOS Game Cheats & Hacks or the iOSGods App for a variety of modded games and apps for non-jailbroken iOS devices.
        • Agree
        • Thanks
        • Winner
        • Like
      • 9 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