【发布时间】:2013-12-24 23:38:21
【问题描述】:
我无法将字符串传递给第二个视图。我正在尝试获取所选 tableviewcell 的 indexpath.row 并传递关联的字符串,但不断收到“无法识别的选择器..” 使用 DLog 时,控制台会显示正确的字符串。在视图上即时传递信息。我有一个 NSString 设置。感谢您的任何帮助,您可以提供!
这是prepareforsegue代码:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"kShowMovie"])
{
MoviePlayerNEWViewController *dvc = (MoviePlayerNEWViewController *)[segue destinationViewController];
NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
DemoVideos *demovideo = [_tableContents objectAtIndex:indexPath.row];
dvc.videoDemoString = demovideo.vd_link;
DLog(@"Video link to pass = %@",demovideo.vd_link);
}
UIViewController * controller = segue.destinationViewController;
[controller setHidesBottomBarWhenPushed:YES];
}
【问题讨论】:
-
请显示完整的错误信息。
-
Martin,这是错误消息的其余部分:2013-12-24 18[22715:1803] TestFlight:已安装崩溃处理程序 2013-[22715:70b] persistentStoreCoordinator 2013-app[22715: 17411] TestFlight:已开始会话 2013-app[22715:17411] TestFlight:应用令牌被识别 2013-12-24 18:28:20.701 app[22715:70b] NSUbiquitousKeyValueStore 错误:com.app.app 没有有效的 com.apple .developer.ubiquity-kvstore-identifier 权利 2013-12-24 18:28:22.413 app[22715:70b] -[UINavigationController setVideoDemoString:]:无法识别的选择器发送到实例 0xcee5f40 (lldb)
标签: objective-c xcode ios7