开发者

Why is there no forward button in the iPhone App?

开发者 https://www.devze.com 2023-01-31 23:40 出处:网络
Why is there no forward button in the iPhone App? I\'m in web industry over 5 years. recently, I dove into iPhone app.

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 i开发者_JAVA技巧Phone 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?


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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消