最近因項(xiàng)目需要迈窟,本人寫了內(nèi)置六種加載動(dòng)畫的框架睁枕。
現(xiàn)Git 開源,簡(jiǎn)潔使用艘蹋,調(diào)用方便锄贼。
先讓大家瀏覽一下各個(gè)動(dòng)畫,如有需要女阀,文末下載宅荤。
加載動(dòng)畫示例
使用步驟:
1.導(dǎo)入框架
框架
2.引入頭文件
#import "MacProgressHUD.h"
3.使用需要的動(dòng)畫塊
//純文字(文本、時(shí)間)
[MacProgressHUD showWaitingWithTitle:@"我是提示文字" time:5];
//圖標(biāo)旋轉(zhuǎn)(旋轉(zhuǎn)速率浸策、圖片地址冯键、時(shí)間)
[MacProgressHUD showWaitingWithImgAnimationsSpeed:3 ImgURL:@"round" time:10];
//圓圈循環(huán)旋轉(zhuǎn)(圓圈顏色、旋轉(zhuǎn)速率庸汗、時(shí)間)
[MacProgressHUD showWaitingWithRoundColor:[NSColor whiteColor] speed:3 time:10];
//點(diǎn)點(diǎn)(點(diǎn)顏色惫确、點(diǎn)速率、時(shí)間)
[MacProgressHUD showWaitingWithPointColor:[NSColor whiteColor] speed:3 time:10];
//進(jìn)度條(進(jìn)度條顏色夫晌、進(jìn)度速率雕薪、時(shí)間)
[MacProgressHUD showWaitingWithProgressColor:[NSColor whiteColor] speed:2 time:10];
//方塊跳動(dòng)(方塊顏色、方塊個(gè)數(shù)晓淀、上下幅度所袁、跳動(dòng)速率、時(shí)間)
[MacProgressHUD showWaitingWithsQuareColor:[NSColor whiteColor] number:5 amplitude:5 speed:1 time:10];