具有注册视图的 iPhone 标签栏应用程序
我是 iPhone 应用程序开发的相对新手,但已经成功创建了一个包含 4 个选项卡栏项目的选项卡栏应用程序。我希望有一个一次性注册页面,供用户在第一次打开应用程序时输入信息。注册页面应在加载选项卡栏项目选择的视图之前加载。
最好的方法是什么?另外,如何在加载选项卡栏项目之前加载 UIView 或 UIWebView?任何建议和示例代码将非常感激 - 谢谢!
I'm a relative newbie on iPhone app development but have successfully created a tab bar app with 4 tab bar items. I would like to have a one-off registration page for users to key-in information when they open the application for the first time. The registration page should load before the view with the selection of tab bar items loads.
What is the best way to do this? Also, how do I load a UIView or UIWebView before the tab bar items load? Any suggestions and sample code would be very much appreciated - thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我所做的就是创建标签栏控制器作为应用程序的主控制器,就好像您没有注册页面一样。然后在 viewdidload 中,检查是否已收集注册信息(在 p-list、钥匙串、数据库或您存储它的任何方式中)。如果有,请照常进行。如果没有(第一次启动应用程序),则使用如下代码向用户呈现模态视图:
modalView 是我的 UIView 或 UIWebView 的名称。希望有帮助!
What I've done for things like this is create the tab bar controller as the main controller for your app as if you didn't have the registration page. Then in the viewdidload, check to see if the registration information has been collected (in a p-list, keychain, db, or however you're storing it). If it has, proceed as usual. If it has not (the first time the app is launched), then present a modal view to the user with some code like this:
With modalView being the name of my UIView or UIWebView. Hope that helps!