Jump to content

Need Help For Preference Bundle


Go to solution Solved by Joka,

19 posts in this topic

Recommended Posts

Follow this please: http://iosgods.com/topic/3054-readme-how-to-post-a-topic-in-this-section/

 

You're not giving us any information on what you're trying to do.

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

<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

 

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

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below. For more information, please read our Posting Guidelines.
Reply to this topic... Posting Guidelines

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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