如何通过iPhone上的按钮切换视图? [英] How to switch views by buttons on iPhone?

查看:98
本文介绍了如何通过iPhone上的按钮切换视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想切换3个视图,并让它们从1-2-3切换.第一个视图是让用户输入名称和密码,第二个视图将显示其信息以供他确认,第三个视图将显示一个选项列表,以便他可以选择下一步.

I want to switch 3 views and let them switch from 1-2-3. The first view is to let users input name and password, the second view will show his information to let him confirm and the third view will show him a list of options so he can choose what to do next.

问题是如何切换这些视图?如果使用导航控件切换视图,如何在其中添加文本字段,以便用户输入其信息?

The problem is how to switch these views? If I use a navigation controll to switch views, how can I add textfield in it so users can input their infomation?

推荐答案

感谢您的回答,我发现这并不像我以前想象的那么复杂.经过几次尝试,我终于做到了.我只是使用NavigationController在UIView之间切换.

Thanks for your answers and I find this isn't so complicated as I thought earlier. After a few attempts, I finally made it. I just use NavigationController to switch between UIViews.

现在,我了解到导航控制器不仅可以从UITableView切换到UIView,还可以从UIView切换到UIView.使用UIView类,我可以轻松地在IB中组织所有控件.

Now I understand that navigation controller can swith not only from UITableView to UIView, but also from UIView to UIView. Using a UIView class, I can organize all the controls easily in IB.

这篇关于如何通过iPhone上的按钮切换视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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