私はuipickerviewの内容を取得したいplistを持っています。plistからUIPickerView
は、私が使用して、コンソールでのplistの内容を出力することができるよ:私は把握するために必要なもの
// Path to the plist (in the application bundle)
NSString *path = [[NSBundle mainBundle] pathForResource:
@"loa" ofType:@"plist"];
// Build the array from the plist
NSMutableArray *array2 = [[NSMutableArray alloc] initWithContentsOfFile:path];
// Show the string values
for (NSString *str in array2)
NSLog(@"--%@", str);
はUIPickerViewにこのコンテンツを取得する方法です。
私は次のことを試してみました:
arrayPicker = [[NSMutableArray alloc] initWithArray:array2];
が、エラーを取得:任意のヘルプあなたが何をすべき
plistは、辞書と各項目の辞書内の4つの文字列を持つ配列です。私はあなたが上記のものと同様のものを試しましたが、エラー "myArray"を取得し続けました。 – hanumanDev