SplitViewController:如何替换辅助视图而不是推出新视图?
如下所示,我有一个简单的故事板。顺时针从拆分视图控制器中顺时针旋转,我们有导航控制器,一个“主题选择器”和一个小游戏。主题选择器中的所有按钮都可以看到游戏中的所有按钮,告诉它要使用的颜色等。 所有这些都均为“显示细节(例如替换)”,而不是“ show(例如push)”。 我希望这些按钮可以用新的游戏视图替换游戏视图,但它会在旧游戏的顶部创建新的游戏视图,因此,如果您按下新的游戏视图一。我认为“显示细节”的重点是替换而不是添加。我在那里误会了什么,我该如何替换?
欢呼!
I have a simple storyboard as shown below. Clockwise from the split view controller we have the navigation controller, a "theme chooser" and a little game. All of the buttons in the theme chooser view segue to the game, telling it what colours to use etc. All of these segues are of type "Show Detail (e.g. replace)", not "Show (e.g. push)". I want the buttons to replace the game view with a new game view, but instead it creates the new game view on top of the old one, so if you press back on the new one, it goes back to the old one. I thought the point of "show detail" was to replace rather than add. What am I misunderstanding there and how do I get it to replace?
Cheers!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我弄清楚了!
由于某些iOS更新,您需要将详细信息嵌入到导航视图中;即,
所以,我更改了准备代码的segue从:
到现在
,现在起作用。
I figured it out!
Since some iOS update, you need to embed your detail view in a navigation view; i.e.,
So, I changed my segue preparing code from:
to
And now it works.