开发者

iPhone + navigate to back screen programmatically

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.

R开发者_运维技巧egards, Pratik


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜