Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios MBProgressHUD更改动画类型_Ios_Iphone_Objective C - Fatal编程技术网

Ios MBProgressHUD更改动画类型

Ios MBProgressHUD更改动画类型,ios,iphone,objective-c,Ios,Iphone,Objective C,因此,我使用MBProgressHUD作为加载视图。我能够让mbprogresshudmodeundeterminate工作并显示它正在加载。但是,每当我尝试使用任何其他类型,例如mbprogresshudmodedefinite或其他类型时,我都看不到这些动画。我只看到一个不动的白色实心圆圈。在我的代码中,我调用的方法如下: HUD = [MBProgressHUD showHUDAddedTo:self.view animated:YES]; 所以我想知道是否有人可以帮我。步骤1:在我们的

因此,我使用
MBProgressHUD
作为加载视图。我能够让
mbprogresshudmodeundeterminate
工作并显示它正在加载。但是,每当我尝试使用任何其他类型,例如mbprogresshudmodedefinite或其他类型时,我都看不到这些动画。我只看到一个不动的白色实心圆圈。在我的代码中,我调用的方法如下:

HUD = [MBProgressHUD showHUDAddedTo:self.view animated:YES];

所以我想知道是否有人可以帮我。

步骤1:在我们的数据库中添加MBProgressHUD.h&MBProgressHUD.m文件

步骤2

#import "MBProgressHUD.h"
步骤3:

MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
hud.mode = MBProgressHUDModeInDeterminate;
hud.labelText = @"Uploading";
[hud show:YES];
步骤4:

[hud hide:YES];

更多详细信息

您需要使用方法
[HUD setProgress:float]
其中float是介于0和1之间的浮点值,以设置
MBPROGRESS HUDMODEDITE
类型HUD的进度值


你到底想监控的是什么?也许一个更具体的问题和代码示例将为您提供更具体、更有用的答案

您是否添加了其委托人?