为什么 iPhone 应用程序中没有前进按钮?
为什么 iPhone 应用程序中没有前进按钮?
我从事网络行业超过 5 年。
最近,我沉迷于 iPhone 应用程序。
一些 iPhone 应用程序开发人员告诉我 “在 iPhone 应用程序中添加转发功能非常困难。 而且,尽管当前屏幕不是应用程序的第一个屏幕,但后退按钮的实现并不总是可能的。”
这是真的吗?
如果是的话, 为什么这很难? 为什么这并不总是可能的?
Why is there no forward button in the iPhone App?
I'm in web industry over 5 years.
recently, I dove into iPhone app.
Some iPhone app developer told me
"It's very hard to add forward function into iPhone app.
And, back button implementation is not always possible although current screen is not the first screen of the app."
Is it true?
If true,
why that is hard?
why that is not always possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这取决于你在说什么,这很难从你的问题中看出。如果您正在讨论在 UINavigationBar(当使用 UINavigationController) 那么这很容易做到。同样,在这种情况下,为您提供了 UINavigationBar 中的后退按钮,因此您无需执行任何操作。
也就是说,通常完全没有必要创建“前进”按钮,因为主应用程序视图中的操作通常负责生成“前进”操作。 (例如:如果用户选择了 UITableView 单元格,这会将应用程序移至下一个屏幕。)
我建议阅读 Apple 的 iOS 视图控制器编程指南,因为它以易于理解的方式涵盖了这些信息。
It depends what you're talking about, which is very hard to tell from your question. If you're talking about adding a custom right hand button in a UINavigationBar (when using a UINavigationController) then it's pretty easy to do. Likewise, in this scenario the back button within the UINavigationBar is provided for you, so you don't need to take any action whatsoever.
That said, it's often completely un-necessary to create a "forward" button, as an action in the main application view would generally be responsible for generating the "forward" action. (e.g.: If a user selected a UITableView cell, this would move the application forward to the next screen.)
I'd recommend reading Apple's View Controller Programming Guide for iOS as it covers this information in an easy to follow manner.
这不是事实。默认情况下有 backButton,您可以在导航栏中添加一个按钮并为其附加一个选择器,在此功能中您可以使用 PushViewController 导航到其他视图。使用导航应用程序然后看看它是多么容易。
使用此链接来了解如何可以进行导航。请参阅网上的其他教程。
编辑:
实际上,在iPhone应用程序中管理着一组视图,其中包含您执行推送操作的所有视图。现在,跟踪堆栈导航控制器的最后一个视图是显而易见的,但哪个是下一个视图如何导航控制器知道,因为不确定,所以我们需要自己执行推送操作。并且没有前进按钮。但是您可以使用导航控制器的推送操作向前导航到任何视图。
This is not truth.There is backButton by default and you can add a button in navigation bar and attach a selector to it and in this function you can navigate to other view by using pushViewController. Use navigation application then see how easy it is.
use this link to read how you can perform navigation.see other tutorial on net.
EDIT:
Actually In iphone apps a stack of views managed which having all views from which you perform operation of push.Now this is obvious to track last view for stack navigation controller but which one is next view how can naigation controller knows that because it is uncertain thats why we need to perform a push operation by self.And there is No forward button.But you can navigate forward to any view by using push operation of navigation controller.
作为附录:
在执行此操作之前,您绝对应该考虑您的应用程序体验。前进按钮只是导航到之前位置的快捷方式。如果您设计应用程序,以便在向后导航视图堆栈时恢复先前视图的状态,那么您可能根本不需要此按钮。
在移动设备等屏幕空间极其有限的环境中,有更好的方法来处理“向前”导航。
就像 middaparka 所说,如果您需要它,您可以自己实现,但首先检查指南。
As an addendum:
Before doing this you should definitely consider your application experience. The forward button is simply a shortcut for navigating to where you were before. If you design your application so that the state of you previous views are restored when navigating backwards through the view stack then you might not need this button at all.
In environments such as mobile where screen real estate is extremely constrained there are better ways of handling the "forward" navigation.
Like middaparka said, if you require it you could implement it yourself but check the guidelines first.