Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
559 views
in Technique[技术] by (71.8m points)

ipad - UISplitviewcontroller not as a rootview controller

I am building my first iPad application. And one of my requirements is to deal with UISplitviewcontroller and UINavigationController.
our proposed view hierarchy is

(LoginView) ->UINavigationView(LandingView + CollectionView)->UISplitViewcontroller( DetailsView).

Our app supports only landscape mode
I am referring this SO Question( and GILT app as well), as a newbi its hard for me to get it done based on that description.

So my questions are
1) How can I achieve same thing,if somebody can give small code snippets or reference to tutorial
2) As per Apples HIG, UISplitviewcontroller should be rootviewcontroller,what if it not. Will apple reject my app.(apparently GILT group has been approved)
3) I found MGSplitViewController , can I use that one not as root?
Any help would be appreciated. As a newbi i hope my question is genuine

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

If you want to use the out-of the box splitView it must be root; any hokeary-pokery here will either break apples guidelines or manifest very odd behaviour.

The MGSplitViewController is completely custom implementation of a SplitViewController. Its very good if you need that sort of thing, but some of the features are based round the fact that our app will be orientating.

Alternatively you could make your own. I have done this more than once and is easier than it sounds.

(LoginView) ->UINavigationView(LandingView + CollectionView)->UISplitViewcontroller( DetailsView).

Based on an out-of-the-box UISplitView, I would suggest:

  • Make the splitView the root View.

  • Pop (not animated) a full screen Modal as soon as the app starts and allow the user to navigate the loginView, LandingView and collectView in this; i also recommend using a navController here.

  • Once the user is ready to proceed to the splitView, populate the splitView's rootView Controller and DetailViewController with whatever you want then ,animate the Modal out.

Dave does have a point, but i would look at it from the point of view that you are removing the choice of orientation from the user; removing standard choices (like supported orientations) because the designer assumes some configuration is more efficient will only annoy some users.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...