从 XIB 到故事板
我有一个带有故事板和一个 .xib 窗口的应用程序。 从故事板到 .xib,我以这种方式移动:
ShowDreamNIBController *detailViewController = [[ShowDreamNIBController alloc] initWithNibName:nil bundle:nil];
[self presentModalViewController:detailViewController animated:nil];
如何从 .xib 移回故事板?
还有一个问题。从情节提要转移到 .xib 时,我可以发送一些信息吗?就像我通过 prepareForSegue
方法 UPD 中的 segues 一样,
我得到了有关关闭 .xib 的答案。需要有关发送信息的答案。
I got an app with a storyboard and one window in .xib.
From the storyboard to the .xib i move in that way:
ShowDreamNIBController *detailViewController = [[ShowDreamNIBController alloc] initWithNibName:nil bundle:nil];
[self presentModalViewController:detailViewController animated:nil];
How can i move back from the .xib to the storyboard?
And one more question. Can i send some information when move to the .xib from storyboard? Like i do it throught segues in prepareForSegue
method
UPD I got answer about closing .xib. Need answer about sending information.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您只需关闭模态视图控制器即可返回故事板。
像这样:
您应该将此方法放入 ShowDreamNIBController 中。
对于第二个问题,您可以通过使用委托获取对模式视图控制器的引用,将信息发送回呈现模式视图控制器的视图控制器。
编辑:
“发送信息到 XIB”是指你想将信息设置到你想要呈现的视图控制器吗?如果是,请在展示模态控制器时使用它:
我希望这会有所帮助。
you can get back to your storyboard by simply dismissing the modal view controller.
Like this:
You should put this method in your ShowDreamNIBController.
As for the second question, you can send back information to the view controller that presented the modal view controller by getting reference to it using delegation.
EDIT:
To "send information to the XIB" do you mean that you want to set information to the view controller that you want to present? If yes, than use this when you present the modal controller:
I hope this helps.