0

I've just created my Settings.bundle for an iOS app and have added two sections. An 'About' and 'Acknowledgements' section. In the 'About' section I have a textfield that displays the version number of the application.

This all displays correctly but when you tap the 'version' textfield the keyboard is displayed and the field is editable. The changes aren't saved but I'd rather the user didn't see the keyboard at all. I just can't seem to find a setting to stop the keyboard from appearing. This is all being done in the Root.plist file.

The code in the Root.plist is:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
    <dict>
        <key>Type</key>
        <string>PSGroupSpecifier</string>
        <key>Title</key>
        <string>About</string>
    </dict>
    <dict>
        <key>Type</key>
        <string>PSTextFieldSpecifier</string>
        <key>Title</key>
        <string>Version</string>
        <key>Key</key>
        <string>application_version</string>
    </dict>
    <dict>
        <key>Type</key>
        <string>PSGroupSpecifier</string>
        <key>Title</key>
        <string>Acknowledgements</string>
    </dict>
    <dict>
        <key>Type</key>
        <string>PSChildPaneSpecifier</string>
        <key>Title</key>
        <string>TMDb API</string>
        <key>File</key>
        <string>AcknowledgementsTMDb</string>
    </dict>
    <dict>
        <key>Type</key>
        <string>PSChildPaneSpecifier</string>
        <key>Title</key>
        <string>FuzzySearch</string>
        <key>File</key>
        <string>Acknowledgements</string>
    </dict>
    <dict>
        <key>Type</key>
        <string>PSChildPaneSpecifier</string>
        <key>Title</key>
        <string>Swifty JSON</string>
        <key>File</key>
        <string>Acknowledgements</string>
    </dict>
</array>
<key>StringsTable</key>
<string>Root</string>
</dict>
</plist>

If anyone has any tips that would be great.

The40Watt
  • 9
  • 2
  • 1
    Use label, if you have to use textfield; disable user interaction on it. – Samraan Khaan Jun 25 '16 at 08:33
  • This could be what you are looking for: http://stackoverflow.com/q/16024893/1187415. – Martin R Jun 25 '16 at 08:53
  • @MartinR Thanks for the link. This helped me to figure it out. I changed the 'version' entry from a textfield to a label. I'm not sure how to mark this question as answered. – The40Watt Jun 25 '16 at 10:01
  • @The40Watt: If that link answers your question then we can mark this question as a duplicate. Alternatively, you can answer your own question if that provides additional information. – Martin R Jun 25 '16 at 10:06
  • @martinR You can go ahead and mark this question as a duplicate. – The40Watt Jun 25 '16 at 20:15

0 Answers0