Writing data from Plist to a UIPickerView
I am creating a Unit Converter app using a UIPickerView with three components and a plist. The first component is category component and the remaining are units components. What I need is when i select an item in category component the remaining two components should get the values regarding that particular component. For this to work how i need to take a plist? Can some one help me on this?
I have taken the following plist. But I am unable to display that in UIPickerView
. please help me
<plist version="1.0">
<dict>
<key>mainkey</key>
<array>
<dict>
<key>mainkey</key>
<array>
<string>minutes</string>
<string>seconds</string>
&l开发者_如何学运维t;string>nanos</string>
</array>
<key>subkeys</key>
<string>Time</string>
</dict>
<dict>
<key>mainkey</key>
<array>
<string>centimeters</string>
<string>millimeters</string>
<string>kilometers</string>
</array>
<key>subkeys</key>
<string>Length</string>
</dict>
</array>
</dict>
</plist>
After loading the values into dictionary you need to consider which category has been selected and you need to load the values for the corresponding category in the remaining two components.For that you need to know about the UIPickerView Delegate methods. Link
精彩评论