如何推动启动屏幕加载视图直到其加载

发布于 2024-10-31 18:02:13 字数 763 浏览 2 评论 0原文

过去几天我已经尝试过此操作,但尚未取得任何成功。 应用程序启动后,我将加载各种 XML 数据。但目前我还没有加载任何加载页面来显示页面的加载。我想添加一个显示数据加载的页面,然后将该加载视图页面推送到选项卡栏控制器页面。 有没有人有任何例子或任何想法来分享,将会非常有帮助。

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:  (NSDictionary *)launchOptions { 
  [navController.navigationBar setTintColor:[UIColor blackColor]]; 
  LoadingViewController *lvc = [[LoadingViewController alloc] initWithNibName:@"LoadingView" bundle:nil]; 
  // Adding the modal view controller to loading View controller on Main Tab bar controller. Hope its correct
  [self.rootController presentModalViewController:lvc animated:YES]; 
  [window addSubview:rootController.view]; 
  [window makeKeyAndVisible]; 
 [self URL]; 
 [lvc release]; 
 return TRUE; 
}

I have tried this for past few days and have not got any success yet.
I am loading various XML Data once the application is launched. But currently I have not loaded any loading page to show the loading of the page. I would like to add a page which shows loading of my data and then push that loading view page to the tab bar controller page.
Does anyone have any example or any idea to share it, will be really helpful.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:  (NSDictionary *)launchOptions { 
  [navController.navigationBar setTintColor:[UIColor blackColor]]; 
  LoadingViewController *lvc = [[LoadingViewController alloc] initWithNibName:@"LoadingView" bundle:nil]; 
  // Adding the modal view controller to loading View controller on Main Tab bar controller. Hope its correct
  [self.rootController presentModalViewController:lvc animated:YES]; 
  [window addSubview:rootController.view]; 
  [window makeKeyAndVisible]; 
 [self URL]; 
 [lvc release]; 
 return TRUE; 
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

A君 2024-11-07 18:02:13

有很多方法可以做这样的事情。一种选择是创建一个显示加载视图的视图控制器。将标签栏控制器添加到窗口。然后将加载视图控制器呈现为选项卡栏控制器上的模式视图控制器。然后开始 xml 解析,解析完成后关闭模态控制器。

There are lots of ways to do something like this. One option is to create a viewcontroller that shows your loading view. add your tab bar controller to the window. Then present the loading view controller as a modal view controller over the tab bar controller. Then start your xml parsing, and dismiss the modal controller when the parsing is finished.

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