具有注册视图的 iPhone 标签栏应用程序

发布于 2024-08-30 20:03:34 字数 194 浏览 3 评论 0原文

我是 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ˉ厌 2024-09-06 20:03:34

我所做的就是创建标签栏控制器作为应用程序的主控制器,就好像您没有注册页面一样。然后在 viewdidload 中,检查是否已收集注册信息(在 p-list、钥匙串、数据库或您存储它的任何方式中)。如果有,请照常进行。如果没有(第一次启动应用程序),则使用如下代码向用户呈现模态视图:

modalView *m = [[modalView alloc] initWithNibName:@"modalView" bundle:nil];
[self presentModalViewController:m animated:YES];
[m release];

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:

modalView *m = [[modalView alloc] initWithNibName:@"modalView" bundle:nil];
[self presentModalViewController:m animated:YES];
[m release];

With modalView being the name of my UIView or UIWebView. Hope that helps!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文