ピッカービューを持つアプリを構築しているため、キーと値を作成する .plist ファイルを作成しました。唯一の問題は、.plist 値にアクセスできるようにすることです。問題は、値がピッカー ビューで選択されたときに、携帯電話番号を呼び出す if ステートメントを作成したい名前の文字列です。可能であれば、値へのアクセスに関するガイドが必要です
これを実行する方法について何か考えはありますか?
NSString *pathToFile = [[NSBundle mainBundle] pathForResource:@"myList" ofType:@"plist"];
NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:pathToFile];
NSString *path = [[NSBundle mainBundle] pathForResource: // here data is file nale of plist
@"data" ofType:@"plist"];
// Build the dictionary from the plist
NSDictionary *dictionary = [[NSDictionary alloc] initWithContentsOfFile:path];