Skip to content
Guest Big Announcement

How to make slider on preferences bundle?

Featured Replies

Solved by Rook

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

  • Author

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

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

  • Author

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

  • Author

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

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.