[翻译] GiFHUD

简介:

GiFHUD

progress hud for displaying only animated gif images. no labels (for now)

状态指示器,仅仅用来显示gif图片,不能添加label(目前为止)

 

Demo - 示例

 

Usage - 使用

Copy & paste the GiFHUD.h/m files to your project. 

复制和粘贴GiFHUD.h/m文件到你的工程当中。
Add your gif file or image sequance files to your project. 

添加gif文件或者image队列文件到你的工程当中。
Import GifHUD.h

导入GifHUD.h文件

//Setup GiFHUD image
[GiFHUD setGifWithImageName:@"pika.gif"];
[GiFHUD show];

Thats it ! 

就这些!

Just use [GiFHUD show] or [GiFHUD showWithOverlay] for showing the hud. 

使用[GifHUD show]或者[GifHUD showWithOverlay]来显示hud。
[GiFHUD dismiss] for dismissing the hud.

[GifHUD dismiss]来让hud消失。

+ (void)setGifWithImages:(NSArray *)images;
+ (void)setGifWithImageName:(NSString *)imageName;
+ (void)setGifWithURL:(NSURL *)gifUrl;

You can set your gif with giving its NSString name, NSBundle url or NSArray of UIImages.

你可以设置你的gif图片,通过给图片名字,NSBundle的url地址或者是图片数组序列。

 

Optional Values - 可以设置的选项

#define Size            150
#define FadeDuration    0.3
#define GifSpeed        0.3
#define OverlayAlpha    0.3

If you want to customise the looking just edit these values on the top of .m file.

如果你想定制一些效果,在.m文件中修改一下即可。

 

Credits 

The animated gif to UIImage library i used: 

我使用了以下的UIImage库来加载gif图片:
https://github.com/mayoff/uiimage-from-animated-gif

 

目录
相关文章
|
存储 自然语言处理 前端开发
从零写一个Recoil(翻译)
Rewriting Recoil from scratchrecoil是facebook编写的一个库,它之所以诞生是因为人体工程学、context的性能问题和useState。这是一个非常聪明的库,几乎每个人都会找到它的用途——如果你想了解更多,请查看这段解释视频。刚开始我被图论和recoil惊到了,但渐渐的理解后,感觉也没那么特别了。也许我也可以实现一个类似的东西。我自己实现的版本和recoil
195 0
从零写一个Recoil(翻译)
|
Web App开发 定位技术 iOS开发
|
Java iOS开发
|
开发者 iOS开发

热门文章

最新文章