how to present a login, with UISplitViewController?

。_饼干妹妹 提交于 2019-12-13 17:26:34

问题


I'm trying to build a universal iOS app. So, in Xcode I started with a Master-Detail template.

In the iPhone version of this, my first view is a list of items, and I have a "Logout" button in my Navigation Bar. When the user launches for the first time, a view-controller is presented, modally, on top of my normal "master" view. It just asks for a user/pass, lets the user log in. If the user hits the "Logout" button, some cleanup occurs, and then they are presented with the Login screen again.

On the iPad side of things, I'd like to have a UISplitViewController - as that interface matches well with what I'm trying to do. I'd like to do this in a similar fashion -- present the user with Login the first time they launch. Then later on, if they decide to leave the app, they can hit Logout, and be presented with Login options again.

I'd prefer to cover the entire screen with one view (just user/pass/login button), but am having trouble figuring that out, especially if the "master" view is visible.

So, the question is this: what is the preferred way to show a login screen, with a UISplitViewController in the mix, so that the user can't do anything else but login?


回答1:


This really sounds like a personal choice/design decision.

You could have the "master" view be the login screen and have the "detail" be just a splash screen or cute kitten photo that says "please login"

You could also have a single UIView be the "initial" view page and have that segue into the splitview

I think you're quite open in the "how" of it so perhaps I'm not quite understanding your question.



来源:https://stackoverflow.com/questions/15843030/how-to-present-a-login-with-uisplitviewcontroller

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!