ユーザーが「LocationsViewController」のセルを選択すると、「LocationsViewController」(UITableViewController)が「LocationsDetailViewController」(UIViewControllerとUILabel)に既に入力されているplistデータをプッシュしようとしています。
「LocationsViewController」では、文字列はテーブルに完全にフィルターされ、エラーは発生しません。しかし、「LocationsDetailViewController」でラベルを変更できないようで、prepareForSegueメソッドのどこかで問題が発生していると思います。
誰かが私のコードのエラーを見つけることができますか?
ヘルプやアドバイスを真剣にいただければ幸いです。ありがとう!!
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([segue.identifier isEqualToString:@"DetailViewControllerSeque"])
{ LocationsDetailViewController *locationsDetailViewController = [segue destinationViewController];
NSString *path = [[NSBundle mainBundle] bundlePath];
NSString *finalPath = [path stringByAppendingPathComponent:@"locationslist3.plist"];
NSArray *tempArray = [finalPath valueForKey:@"countries"];
NSString *descriptionString = [tempArray valueForKey:@"countries"];
locationsDetailViewController.detailDescriptionLabel.text = descriptionString;
}
}
@end