SplitViewController 更新详细信息视图

发布于 10-11 10:45 字数 415 浏览 4 评论 0原文

我正在使用 SplitViewController,我想扩展它的使用方式,但我一直被这些东西困扰......

我想实现这样的目标:

  1. 在我的 splitview (mainCategory) 主控制器中,如果选择单元格,我推送了另一个控制器(子类别),然后,还更新 splitView 的详细控制器(第二个详细视图) -->我已经这样做了..

  2. 当 splitView 的主控制器是推送控制器(本例中的子类别)时,然后我选择了导航的“后退”按钮,我还需要更新详细控制器splitView 到第一个详细视图的…。但怎么办?我被这个问题困扰...?

有什么帮助吗?我已经遵循了苹果示例代码 MultipleDetailView 但我的情况有所不同..感谢任何帮助/建议。

谢谢

I'm using a SplitViewController, and I want to extend how it's being used but I've got stucked with this stuff...

I want to achieve something like this:

  1. In my master controller of splitview (mainCategory), if the cell is selected, I've pushed another controller (subCategory), then, update also the detail controller of the splitView (2nd detail view) --> I've done this already..

  2. When the master controller of splitView is the pushed controller (subCategory for this example), then I've select the "back" button of the navigation, I need to update also the detail controller of the splitView to 1st detail view…. but how ??? I'm stucked with this problem...?

Any help pls?? I'm already followed the apple sample code MultipleDetailView but my case is different.. appreciate any help/advise.

Thanks

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

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

发布评论

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

评论(2

究竟谁懂我的在乎2024-10-18 10:45:26

以下代码应该可以解决您的问题。

[detailViewController.navigationController popViewControllerAnimated:YES];

[self.navigationController popViewControllerAnimated:YES];

可以在此处下载要检查的示例项目。

从这篇文章获得的示例:https://stackoverflow.com/questions/5263128/splitviewcontroller-with-two-navigationcontroller-linking-protocols

The following code should fix your issue.

[detailViewController.navigationController popViewControllerAnimated:YES];

[self.navigationController popViewControllerAnimated:YES];

Example Project to examine can be downloaded here.

Example obtained from this post: https://stackoverflow.com/questions/5263128/splitviewcontroller-with-two-navigationcontroller-linking-protocols

森林迷了鹿2024-10-18 10:45:26

使用 iOS 4.0 SDK 在 Xcode 3.24 中构建示例项目收到 7 个警告。 MainWindow.xib:六个关于应用程序委托和视图控制器类中缺少的插座,一个关于缺少操作方法。

在加载 .xib 文件时,在 iPad 模拟器中运行构建的应用程序会崩溃。

果然,查看代码,我可以看到类声明中缺少出口引用的对象(而它们的“@property”和“@synthesize”声明按预期存在)。但添加缺失的代码并不会让警告消失。运行“固定”代码会导致完全相同的崩溃。

我还对 Unixed 帖子中第二个链接引用的进行了更改。构建时的警告或运行时的崩溃没有变化。

Building the Example Project in Xcode 3.24 with the iOS 4.0 SDK gets 7 warnings re. MainWindow.xib: six about missing outlets in the app delegate and view controller classes, one about a missing action method.

Running the built app in the iPad Simulator gets a crash as the .xib file is being loaded.

Sure enough, looking at the code I can see the objects the outlets refer to ARE missing from the class declarations (while their '@property' and '@synthesize' declarations are present as expected). But adding the missing code doesn't make the warnings go away. And running the "fixed" code gets the exact same crash.

I also made the changes referenced by the second link in Unixed's post. No change in the warnings on build or the crash on run.

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