我正在尝试推送一些plist数据,当用户在“LocationsViewController”中选择一个单元格时,已经将我的“LocationsViewController”(UITableViewController)填充到我的“LocationsDetailViewController”(带UILabel的UIViewController)。
在“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