问题标签 [svprogresshud]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
4143 浏览

ios - SVProgressHUD 如何延迟指定的时间

我正在使用第三部分 UIActivityIndi​​cator SVProgressHUD,当我的视图加载时我正在初始化它。我想在我的应用程序中发生一些事情时将 activityIndi​​cator 延迟大约 1 秒。然后调用[SVProgressHUDdismiss];基于那 1 秒的等待.. 但我不知道该怎么做。

目前这是我的代码在 viewdidload 中的样子

我知道有一个dismisswithsucsess:timer ..但这似乎延迟了我不想要的成功消息出现的时间量..我想延迟指示器并且没有文本..但就是想不到一种方法。

我试过了

我也试过

并把 [SVProgressHUD 解雇]; 在 stopAnimating 方法中,但这会失败,因为似乎所有调用都需要在同一个方法中。

0 投票
2 回答
551 浏览

iphone - SVProgressHUD 在视图中关闭WillDisappear 好吗?

[SVProgressHUD dismiss]不显示就可以打电话吗?我想这样做的原因是因为我希望 HUD 在视图消失时总是消失。

0 投票
4 回答
5575 浏览

iphone - SVProgressHUD 未显示活动指示器

我正在尝试实现 SVProgressHUD 进度活动指示器。我从 [demo] 中复制了课程。1

我的应用程序已加载,但未显示活动指示器。这是我第一次尝试使用其中一个,所以任何帮助将不胜感激。

这是代码:

0 投票
1 回答
288 浏览

iphone - 如何在 UIWebView 中应用 SVProgressHUD?

我有这个代码,但不起作用,我不知道为什么?

0 投票
3 回答
3583 浏览

iphone - SVProgressHud 几秒钟后消失

我在我的应用程序中添加了 SVProgressHud,并且在大多数 viewController 中工作得非常好。但是当我展示 SVProgressHud 时,它在导航控制器的第一个孩子中表现得很奇怪,但它会在几秒钟后消失,只显示活动指示器。
看到这个图像,当我显示 progressHud 时显示

在此处输入图像描述

这将在几秒钟后显示

在此处输入图像描述

我在 viewDidLoad 方法中展示了这个进度界面,这是我的代码。

并在流程完成后关闭 SVProgressHud。

0 投票
1 回答
2133 浏览

svprogresshud - iOS-Xcode:app开头的ProgressHUD

首先对不起我的英语,它不是我的母语。

我正在开发一个从 JSON 收集数据并将它们显示在表格中的 iOS 应用程序。一切正常。我的问题是 JSON 有很多数据,应用程序需要几秒钟才能显示数据。所以,我需要放置一个收费指示器来提醒用户等到应用程序加载数据。要使用我下载的卖家 SVProgressHUD 的收费指示器:

https://github.com/samvermette/SVProgressHUD

我已将 SVProgressHUD 集成到我的应用程序中,但我无法让它按我的意愿工作。

在我的应用程序中,我有一个 AppDelegate 类和一个 MasterViewController 类(我在其中加载 JSON 数据,填充 tableView 并显示 tableView)

我想要的是当应用程序开始执行时,它会显示带有文本“正在加载”的 SVProgressHUD,当出现带有所有数据的 tableView 时,SVProgressHUD 就会消失。

为此,我在方法 didFinishLaunchingWithOptions 的类 AppDelegate 中添加了这行代码:

在我的 MasterViewController 类中,在 viewDidLoad 方法中,我添加了这行代码:

添加这些代码行后,我的应用程序照常运行并且不显示充电指示灯。

我认为这可能是因为在 didFinishLaunching 中仍然没有加载视图,您可以在其中显示充电指示器,但我不知道我必须添加什么代码才能使其正常工作。

问候并感谢您的帮助。

0 投票
2 回答
1207 浏览

ios - Performance Issues with SVProgressHUD

I have a section of code that is producing pour performance and not working as expected. it utilizes the SVProgressHUD from the following github repository at https://github.com/samvermette/SVProgressHUD. I have an area of code where I need to use [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error]. I want to have a progress hud displayed before the synchronous request and then dismissed after the request has finished. Here is the code in question:

For some reason the synchronous request blocks the HUB from being displayed. It displays immediately after the synchronous request happens, unfortunatly this is also when it is dismissed. The behaviour displayed to the user is that the app hangs, waits for the synchronous request to finish, quickly flashes the HUB and then becomes responsive again. How can I fix this issue? I want the SVProgressHUB to be displayed during this hang time, how can I do this?

0 投票
1 回答
46 浏览

ios - Method code not executing in the correct order

I have two methods. One method is used to load my SVProgressHUD, the second method is used to get data from my coreData and sort it then present it in a new UITableView. The user selects are UITableViewCell which calls:

didSelectRowAtIndexPath

Then I have two method calls in this, the first is:

[self loadHUD];

This method loads a hud (which never shows if I implement the second method in didSelectRowAtIndexPath). This is the second method:

[self loadAndSortArray];

When I call this for some reason it is preventing the SVProgressHud from ever appearing, however if I remove this method call then the hud loads fine.

I would like to know how I can have both methods but display the hud before the second method starts ?

0 投票
1 回答
1394 浏览

ios - SVProgressHUD 显示在模态视图的背景中

我有一个UIViewController从中呈现模态视图的视图。

它有两个UIBarButtonItems(名为CancelSave)。我正在点击保存按钮执行一些操作。我SVProgressHUD在方法上显示指标-saveButtonTapped

问题是指示器没有显示在我的ModalView. 它开始动画,但在 后面ModalView,而不是前面。


怎么了 :

UIViewController ===> SVProgressHUD ===> ModalView

我想要的是 :

UIViewController ===> ModalView ===> SVProgressHUD


搜索但没有找到任何解决方案。

为什么会发生这种情况以及如何解决这个问题?

0 投票
2 回答
660 浏览

ios - 在 viewDidLoad 中执行对服务器的调用

我对iOS开发很陌生,我遇到了以下问题。我需要用从服务器获取的数据填充 UITableView。

我正在使用AFNetworking. 我想显示一个“加载视图” SVProgressHUD,我正在执行以下操作:

我从服务器获得了正确的答案,但没有显示进度界面。对服务器的调用确实需要几秒钟,因此有时间加载进度 hud 视图,但没有任何反应。

我正在执行调用,viewDidLoad因为我需要在加载视图后立即进行调用,并且我只想调用一次。

如果我将此代码块移动到viewDidAppear进度 hud 加载,但是每次显示视图时都会调用此方法并且我不想要这个...

非常感谢!