您的当前位置:首页正文

SVProgressHUD的使用

来源:华拓网

SVProgressHUD自定义时:必须写上代码:[SVProgressHUD setDefaultStyle:SVProgressHUDStyleCustom],以下是自定义的内容

1:设置圆圈的大小


[SVProgressHUD setRingNoTextRadius:10];--无文本的圆环半径设置 ;例如:[SVProgressHUD show];


[SVProgressHUD  setRingRadius:10];                            // (有文本时) HUD圆环半径设置例如:[SVProgressHUD showWithStatus:@"正在加载..."]


2:SVProgressHUD 设置正方形背景样式(或颜色)

[SVProgressHUD setDefaultStyle:SVProgressHUDStyleLight];//正方形的背景样式(或颜色),白色背景,黑色圆环和文字

[SVProgressHUD setDefaultStyle:SVProgressHUDStyleDark];//正方形的背景样式(或颜色),黑色背景,白色圆环和文字

[SVProgressHUD setDefaultStyle:SVProgressHUDStyleCustom];//这个是无方框背景样式(背景颜色为clearColor) [若要自定义必须先设setDefaultStyle为SVProgressHUDStyleCustom,再进行setForegroundColor(前景颜色:小圆圈的颜色),setBackgroundColor(背景颜色)的配置.]