用于用户注册过程的 Segue 类型 - iOS 5 [英] Segue type to be used for a user registration process - iOS 5

查看:19
本文介绍了用于用户注册过程的 Segue 类型 - iOS 5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的第一个 ios 应用程序 &我有一个用户注册过程,它分为 3 个屏幕.第一个屏幕让用户输入他的手机号码,第二个屏幕要求他选择他的位置 &第三个屏幕要求他输入他的生日和其他一些详细信息.

This is my first ios app & I have a user registration process which is separated out into 3 screens. The first screen has user to enter his mobile number, the second screen asks him select his location & the third screen asks him to enter his birthday and a few other details.

因此,我总共使用了 3 个控制器.

So in total, there are totally 3 controllers which I have used.

1) mobile_number_controller.rb2) location_controller.rb3) miscellaneous_details_controller.rb

1) mobile_number_controller.rb 2) location_controller.rb 3) miscellaneous_details_controller.rb

用户输入的每个细节都经过验证并存储到 NSUserDefaults 中.如果验证失败,则不允许用户移动到下一个屏幕.此外,一旦用户正确输入了他的详细信息,那么用户也没有返回按钮来返回上一屏幕.

Each detail the user enters is validated and is stored into the NSUserDefaults. If the validation fails then the user is not allowed to move to the next screen. Also, once the user enters his details correctly, then the user does not have a back button to go back to the previous screen as well.

我想知道这里使用的转场类型是什么.我应该将这些控制器嵌入到导航控制器中并使用推送转场,还是应该使用模态转场?

I would like to know which is the type of segue to be used here. Should I embed these controllers in a navigation controller and use a push segue, or should I be using a modal segue?

关于控制器链的更新.

我不打算在任何阶段将用户带回任何演示控制器.此外,到目前为止,在我读过的大多数代码中,对于 modal segues,我已经看到呈现的控制器被解除,或者有一个返回到呈现的控制器的 unwind segue.在展示系列中的下一个控制器之前,我对如何处理这些展示的控制器感到有些困惑?

I don't intend to take the user back to any presenting controller at any stage. Also, in most code I have read till now, for modal segues, I have seen the presented controller being dismissed or there's an unwind segue to go back to the presented controller. I am a bit confused on what to do with these presented controller here before presenting the next controller in the series?

此外,正如我提到的,我将用户输入的任何数据存储在 NSUserDefaults 中,呈现控制器不需要知道在呈现控制器中输入的数据.因此,我不觉得需要放松转场(就像在新联系人"应用程序中一样).

Also, as I mentioned that I store whatever data has been entered by the user in NSUserDefaults, theres no need for the presenting controller to know about the data entered in the presented controller. Hence I don't feel the need for an unwind segue( like in the 'new contacts' application).

对此的任何帮助将不胜感激.

Any help on this would be much appreciated.

推荐答案

我会使用一系列模态转场(呈现的视图控制器).这不是用户可以在视图之间前进和后退"的情况:完全控制用户看到的内容.在呈现的视图控制器之上呈现视图控制器是完全合法的.此外,控制您将用户带回多远也很简单,例如一路返回(驳回所有意见),如果那是你想做的.

I would use a series of modal segues (presented view controller). This is not a "user can go forward and back among views" situation: you are in total control of what the user sees. It is perfectly legal to present a view controller on top of a presented view controller. Moreover, it is simple to control how far back you take the user, e.g. go back all the way (dismissing all the views), if that's what you want to do.

这篇关于用于用户注册过程的 Segue 类型 - iOS 5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆