天天看點

[翻譯] GiFHUD

GiFHUD

[翻譯] GiFHUD

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

狀态訓示器,僅僅用來顯示gif圖檔,不能添加label(目前為止)

Demo - 示例

[翻譯] GiFHUD

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 

UIImage

s.

你可以設定你的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