Jump to content

Need Help For Preference Bundle


rohan

19 posts in this topic

Recommended Posts

Posted

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

 

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

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

Posted
<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

Posted
<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

Posted


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


 

Posted

 

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.

×
  • 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