Jump to content

How to make slider on preferences bundle?


Go to solution Solved by Rook,

14 posts in this topic

Recommended Posts

Posted (edited)

Find the slider code somewhere

 

In tweak.xm,

#define plistPath @"/var/mobile/Library/Preferences/UrMom.plist"

inline int GetPrefInt(NSString *key)
{       
       return [[[NSDictionary dictionaryWithContentsOfFile:plistPath] valueForKey:key] intValue];
}

%Hook UrMom 
-(int)speed {
return GetPrefInt(@"kSpeedAmount);
}
%end
No one f**king like this post -_- Updated by HATER
Posted

Find the slider code somewhere

In tweak.xm,

#define plistPath @"/var/mobile/Library/Preferences/UrMom.plist"

inline int GetPrefInt(@"kInt")) 
{
       return [[[NSDictionary dictionaryWithContentsOfFile:plistPath] valueForKey:key] intValue];
}

%Hook UrMom 
-(int)speed {
return GetPrefInt(@"kSpeedAmount);
}
%end
No one f***ing like this post -_-
Lol thx
  • Solution
Posted (edited)

This is the one for plist:

 

<dict>
      <key>cell</key>
      <string>PSSwitchCell</string>                         //This is the switch to turn the slider on or off
      <key>default</key>
      <false/>
      <key>defaults</key>
      <string>xxxx</string>
      <key>key</key>
      <string>kKEY</string>
      <key>label</key>
      <string>SWITCH NAME</string>
    </dict>
    <dict>
            <key>cell</key>
            <string>PSSliderCell</string>
            <key>default</key>
            <integer>1</integer>
            <key>defaults</key>
            <string>xxxx</string>
            <key>key</key>
            <string>kkey</string>
            <key>label</key>
            <string>Modifier</string>
            <key>max</key>
            <real>100</real>
            <key>min</key>
            <real>1</real>
            <key>showValue</key>
            <false/>
            <key>alignment</key>
            <string>3</string>
    </dict>

Take a look at this also: http://iphonedevwiki.net/index.php/Preferences_specifier_plist#PSSliderCell

Updated by DiDA
Posted

This is the one for plist:

 

 

<dict>
      <key>cell</key>
      <string>PSSwitchCell</string>                         //This is the switch to turn the slider on or off
      <key>default</key>
      <false/>
      <key>defaults</key>
      <string>xxxx</string>
      <key>key</key>
      <string>kKEY</string>
      <key>label</key>
      <string>SWITCH NAME</string>
    </dict>
    <dict>
            <key>cell</key>
            <string>PSSliderCell</string>
            <key>default</key>
            <integer>1</integer>
            <key>defaults</key>
            <string>xxxx</string>
            <key>key</key>
            <string>kkey</string>
            <key>label</key>
            <string>Modifier</string>
            <key>max</key>
            <real>100</real>
            <key>min</key>
            <real>1</real>
            <key>showValue</key>
            <false/>
            <key>alignment</key>
            <string>3</string>
    </dict>
Take a look at this also: http://iphonedevwiki.net/index.php/Preferences_specifier_plist#PSSliderCell

Oh thanks :D

Posted

Oh thanks :D

Hell! If you can read through the whole iPhone Dev Wiki, you'd be a master at this :3

Posted

Hell! If you can read through the whole iPhone Dev Wiki, you'd be a master at this :3

I don't like reading but I'll well try memorize it :)

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