iPhone Dev - 是否可以有条件地加载应用程序的主窗口?
iPhone 应用程序启动后,是否可以对这一系列事件进行编码?
- 用户启动应用程序。
- AppDelegate.m 检查内部数据库中是否存在数据。
- 如果是,则加载 MainWindow.xib。
- 如果不是,则加载 AnotherViewController.xib。
我只见过无条件加载 MainWindow.xib 的应用程序示例。
如果可能的话,AppDelegate.m 中的哪个方法处理逻辑? (applicationDidFinishLaunching?viewDidLoad?)
Is it possible to code this sequence of events once an iPhone app has been launched?
- User launches application.
- AppDelegate.m checks if data is present in internal database.
- If yes, MainWindow.xib loads.
- If no, AnotherViewController.xib loads.
I've only seen app examples that load the MainWindow.xib without conditions.
If it is possible, which method in AppDelegate.m handles the logic? (applicationDidFinishLaunching? viewDidLoad?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您不想有条件地加载 MainWindow。相反,有条件地加载并显示 viewController。这可以在 applicationDidFinishLaunching 中完成。
I don't think you want to load the MainWindow conditionally. Instead, load and show a viewController conditionally. This can be done in applicationDidFinishLaunching.