故事板从表格单元格及其详细信息披露按钮开始

发布于 2024-12-29 12:12:35 字数 117 浏览 4 评论 0原文

我想从一个表格单元切换到两个不同的视图控制器 如果单击单元格或单击单元格详细信息披露按钮。

如果我按住 Ctrl 键并拖动第二个 Segue,则第一个将被删除。 我做错了什么?

总氮 云母

I want to segue from a tablecell to two different viewcontrollers
if clicked in the cell or clicked on the cells Detail Disclosure Button.

If I ctrl-drag the second segue, the first is deleted.
What am I doing wrong?

Tnx
Mica

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

剧终人散尽 2025-01-05 12:12:35

我认为您无法将特定的详细信息披露按钮与 Segue 链接起来。我的故事板非常程序化,因为我使用了大量自定义 CGRect 等。

所以我倾向于使用这样的东西:

-(void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
{
    [self performSegueWithIdentifier:@"ViewControllerIdentifer" sender:self];
}

作为参考,这是一个关于故事板和表格视图的非常好的示例项目。底部还有一个指向该项目的链接。

http://www.raywenderlich.com/5191/beginning -storyboards-in-ios-5-part-2

I don't think you can link a specific detail disclosure button w/ a segue. My storyboards are extremely programatic b/c I use alot of custom CGRect etc..

so I tend to use something like this:

-(void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
{
    [self performSegueWithIdentifier:@"ViewControllerIdentifer" sender:self];
}

for reference this is an extremely good example project on storyboards and tableviews. there's a link to the project at the bottom also.

http://www.raywenderlich.com/5191/beginning-storyboards-in-ios-5-part-2

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文