iPhone +以编程方式导航到后屏幕

发布于 2024-08-18 17:00:39 字数 265 浏览 1 评论 0原文

我正在开发一个应用程序,我需要以编程方式提供向后屏幕的导航,其中有两种情况:

  1. 上面有一个 MainWindow.xib 和几个按钮,单击任何一个按钮将加载另一个适当的屏幕。在此屏幕上,我需要放置后退按钮,单击该按钮将再次加载 MainWindow.xib,用户可以选择其他选项。

  2. 除了上述场景外,所有屏幕都会包含后退按钮,单击后退按钮将再次加载前一个,用户可以选择其他选项。

    除了上述场景外

问候, 普拉蒂克

I am developing a application in which I need to provide navigate to backward screen programmatically, in which there are two scenarios:

  1. There will one MainWindow.xib and few buttons on it, click of any one button will load another appropriate screen. On this screen, I need to put back button, click of which will load MainWindow.xib again and user can choose some other option.

  2. Except the above scenario, also all the screens will contain back button, click of which will load the previous again and user can choose some other option.

Regards,
Pratik

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

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

发布评论

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

评论(1

请止步禁区 2024-08-25 17:00:39

您想要使用 UINavigationController为了这。请参阅文档和示例项目的链接。我无法在这里给出完整的示例,但您可以从 XCode 中的“基于导航的应用程序”模板开始。

总体思路是,您将视图推送到 UINavigationController 或从 UINavigationController 弹出视图,它将为您处理后退按钮和导航工具栏。这非常简单。

You want to use the UINavigationController for this. See the link for the documentation and example projects. I can't really give a full example here, but you can get started with the "Navigation-Based Application" template in XCode.

The general idea is that you push and pop views to/from a UINavigationController, and it will handle the back button and navigation toolbar for you. It's pretty straight forward.

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