Search code examples
iphoneobjective-cplistuipickerview

How to populate UIPickerView with .plist file?


I want to populate one.plist files from a number of .plist files as per the user selection . How to populate UIPickerView with a .plist file ?


Solution

  • I don't understand your question well but here is what I guess. You may want to load data from a .plist file and then fill in the UIPickerView.

    Here is a sample code for loading a .plist file:

    NSString *path = [[NSBundle mainBundle] bundlePath];
    NSString *finalPath = [path stringByAppendingPathComponent:@"money.plist"];
    NSDictionary *plistDictionary = [[NSDictionary dictionaryWithContentsOfFile:finalPath] retain];