本文介绍了如何在加载视图时隐藏tabbar操作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个iphone应用程序,我在调用webservice之后添加了一个视图,在视图中有一个加载视图。但是当该视图加载某人点击我的tabbar项时,应用程序崩溃。我需要有tabbar动作被隐藏,直到该视图被加载。我不想隐藏tabbar,只有动作,有谁知道如何做到这一点?谢谢。

I have an iphone application in which I am adding a view after calling a webservice,having a loading view inside the view.But when that view is loading somebody clicks on my tabbar item the app is crashing.I need to have that tabbar action to be hidden untill that view is loaded.I dont want to hide the tabbar,only action,Can anybody know How to do this? Thanks.

推荐答案

您可以禁用与标签栏的用户互动,如下所示:

You can disable the user interaction with the tabbar like this:

[[[self tabBarController] tabBar] setUserInteractionEnabled:NO];

在您的网络服务加载完成或失败后稍后启用它。

And enable it later after your webservice has finished loading or failed.

但你应该停止你的网络服务

But you should stop your webservice in the

-(void)viewDidUnload

这篇关于如何在加载视图时隐藏tabbar操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 07:40