2010-07-28 83 views
1

我想根據用戶選擇從多個.plist文件填充one.plist文件。 如何用.plist文件填充UIPickerView?如何用.plist文件填充UIPickerView?

+0

我不明白你的問題。爲什麼不把一個.plist文件加載到一個數組中,然後用該數組填充UIPickerView? – vodkhang 2010-07-28 08:56:56

回答

1

我不明白你的問題,但這是我的猜測。您可能想要從.plist文件加載數據,然後填寫UIPickerView。

下面是加載的.plist文件中的示例代碼:

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