开发者

Should we Ever Change RootView Controller of IPhone Application?

I want to create an application.

The application will let people to read jokes, for example. Then peo开发者_开发问答ple can press a button and another view show up where people can insert their own jokes.

After people finish inserting their own joke, I want them to go back the previous screen.

What would be the standard way to do so?

Put all controllers on application delegate and change the rootviewcontroller?


One possibility would be to use the presentModalViewController:animated: method of the root UIViewController to present the "joke inserter" view.

Once the joke insert was complete (or if the user cancelled the insertion) you'd simply return to the previous view as-is.


The uinavigation controller will work well. U can push people to a new controller where they enter their joke and then pop them back to the root. U can do this with or without animation. Set up the UiNavigationController in the app delegate and initialize it with your jokesviewcontroller as the root.

Here is a post I just did on this subject

Programming iOS: clarifications about Root View Controller

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜