3

Could anyine tell me what the preferred method is for giving a slider item a title when configuring Root.plist in XCode please? I have scoured all the documentation and played around with a dummy Root.plist file (including getting XCode to crash by changing values) but I can't see an obvious way of giving a slider a title. Thanks in advance, V.V.

Flyingdiver
  • 2,142
  • 13
  • 18
VectorVictor
  • 693
  • 1
  • 10
  • 20

2 Answers2

2

You can either set the header / footer text, or create a cell above it.

<dict>
    <key>cell</key>
    <string>PSGroupCell</string>
    <key>label</key>
    <string>Slider Title</string>
</dict>
WrightsCS
  • 50,551
  • 22
  • 134
  • 186
  • Sorry, that answer is just a bit too short. First, what are the "header/footer text" and where can they be edited - I see no such entries in the info.plist editor within Xcode. Second, the cell you demonstrate above - where does it go in the .plist? just before the slider entry? should I create a group for the slider and the title? please... elaborate just a little more. Thanks. – Motti Shneor Jan 10 '17 at 09:47
  • BTW, tried this, and it doesn't work for me. The label does NOT appear. Only if I add a group item, I can label it, and so have something of a title for my slider. – Motti Shneor Jan 10 '17 at 10:53
  • @MottiShneor well this was back from 2011, so I would imagine a lot has changed since. – WrightsCS Jan 10 '17 at 17:08
  • There are other people (like me...) who still look for answers for this question, so for their benefit I added my comment. Plus, I added my own answer below. – Motti Shneor Jan 11 '17 at 18:29
0

More recent configuration -- place the following above your slider dict.

<dict>
    <key>Type</key>
    <string>PSGroupSpecifier</string>
    <key>Title</key>
    <string>Your Title</string>
</dict>

Source: https://developer.apple.com/library/archive/documentation/PreferenceSettings/Conceptual/SettingsApplicationSchemaReference/Articles/PSGroupSpecifier.html#//apple_ref/doc/uid/TP40007009-SW1

Gary Tsui
  • 1,755
  • 14
  • 18
  • 2023 - Xcode 14. Still a bit of puzzle. I find that in the Xcode plist editor, if you add a slider, there is no title key field and the slider ends up the width of the panel. When you go to add a field within the slider, there is no option for "title". However if you pick and add another field, you can then change it to a Title and add a title string. The title field lines up with the others in the panel and the slider is shortened to the balance of the width. No idea if this is legit, but for now works. – altimes Feb 02 '23 at 23:33