Skip to content
Guest Big Announcement

Need Help For Preference Bundle

Featured Replies

He did DiDA :p don't be such a noob

 

<dict>
    <key>cell</key>
        <string>PSSwitchCell</string>
    <key>alternateColors</key>
        <true/>
</dict>
  • Author

He did DiDA :p don't be such a noob

<dict>
    <key>cell</key>
        <string>PSSwitchCell</string>
    <key>alternateColors</key>
        <true/>
</dict>

 

<dict>

<key>cell</key>

<string>PSSwitchCell</string>

<key>default</key>

<false/>

<key>defaults</key>

<string>ninjakid</string>

<key>key</key>

<string>kCoins</string>

<key>label</key>

<string>Unlimited Coins</string>

</dict>

 

 

my bundle

Where to put your code?

i just want to change the colour of on/off switch

Updated by rohan

<dict>
    <key>cell</key>
        <string>PSSwitchCell</string>
    <key>default</key>
        <false/>
    <key>defaults</key>
        <string>ninjakid</string>
    <key>key</key>
        <string>kCoins</string>
    <key>label</key>
        <string>Unlimited Coins</string>
    <key>alternateColors</key>
        <true/>
</dict>

Here I edited it for you. You only had to add the alternateColor key the rest was a sample to visualize it

  • Author
<dict>
    <key>cell</key>
        <string>PSSwitchCell</string>
    <key>default</key>
        <false/>
    <key>defaults</key>
        <string>ninjakid</string>
    <key>key</key>
        <string>kCoins</string>
    <key>label</key>
        <string>Unlimited Coins</string>
    <key>alternateColors</key>
        <true/>
</dict>

Here I edited it for you. You only had to add the alternateColor key the rest was a sample to visualize it

 

nothing happens

still showing green colour


If it doesn't work use this code instead and write it in your Preferences.mm. I used red color here for @@DeadGod


#import <Preferences/PSSwitchTableCell.h>

 

@interface SRSwitchTableCell : PSSwitchTableCell

@end

 

@implementation SRSwitchTableCell

 

- (id)initWithStyle:(int)fp8 reuseIdentifier:(id)fp12 specifier:(id)fp16 {

self = [super initWithStyle:fp8 reuseIdentifier:fp12 specifier:fp16];

if (self) {

[((UISwitch *)[self control]) setOnTintColor:[UIColor redColor]];

}

return self;

}

 

@end


 

Updated by castix

  • Author

 

so... If I want it red I just add this?

<key>alternateColors</key>
      <true/>FF0000

prefbundle blank, not showing anything

 

also can't open ninjakid.plist file 

 

 

this type of error - Encountered unexpected character fon line 29 while looking for open tag

 

Archived

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

Featured Content

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.