【发布时间】:2014-10-21 07:13:29
【问题描述】:
场景
我有一个应用程序可以在 UITableViewController 中向用户显示帖子 - 在某些包含 cmets 的帖子中,该单元格内会有 另一个 UITableView 来显示 cmets。每个评论都将包含一个位于 UIButton 下方的个人资料图片。当这个 UIButton 被推送时,我希望 UITableViewController 类与另一个 UIViewController 相连接,该 UIViewController 将显示有关发布该帖子的用户的信息。
所以,回顾一下
UITableViewController 将执行 Push Segue
UITableViewController 拥有UITableViewCells
UITableViewCells (包含 cmets) 将有一个孩子 UITableView
UITableView 将包含单元格本身,每个单元格都有一个UIButton
当UIButton 被推送时,UITableViewController 将执行 Push Segue
我的尝试
- (void)ProfilePictureWasPushed:(UIButton *)sender {
NSDictionary *object = [self.comments objectAtIndex:sender.tag];
DashboardViewController *dashboard = [[DashboardViewController alloc]init];
dashboard.selectedID = object[@"posterID"];
[dashboard performSegueWithIdentifier:@"profile" sender:dashboard];
}
我收到此错误...
...reason: 'Receiver (<DashboardViewController: 0x7d867600>) has no segue with identifier 'profile''
我已经检查过,实际上有一个叫做“profile”的 push segue。
问题
有谁知道如何正确执行此壮举?
【问题讨论】:
标签: ios objective-c uitableview segue