2016-12-21 79 views
2

我想以不同的方式显示Hud的Ring和Text颜色。我使用hud样式SVProgressHUDStyleCustom,但无法达到所需结果。如何通过使用SVProgressHUDStyleCustom更改环和文本颜色

我的代码如下:

[SVProgressHUD setDefaultStyle:SVProgressHUDStyleCustom]; 
[SVProgressHUD setRingThickness:5.0]; 
[SVProgressHUD setForegroundColor:[UIColor redColor]]; 
[SVProgressHUD setFont:[UIFont ProximaNovaA_Light:16.0]]; 
[SVProgressHUD setCornerRadius:3]; 
[SVProgressHUD setBackgroundColor:[UIColor whiteColor]]; 

任何帮助将受到欢迎。

回答

0

尝试这个

[[SVProgressHUD appearance] setHudBackgroundColor:[[UIColor greenColor] colorWithAlphaComponent:0.4]]; 
[[SVProgressHUD appearance] setHudForegroundColor:[UIColor yellowColor]]; 
[[SVProgressHUD appearance] setHudFont:[UIFont fontWithName:@"MarkerFelt-Wide" size:16]]; 
[[SVProgressHUD appearance] setHudStatusShadowColor:[UIColor greenColor]]; 
[SVProgressHUD showSuccessWithStatus:@"Great Success!"]; 
+0

此代码不能与最新的SVProgressHud工作。 – Irfan

-1
[[SVProgressHUD appearance] setHudBackgroundColor:[[UIColor greenColor] colorWithAlphaComponent:0.4]]; 

[[SVProgressHUD appearance] setHudForegroundColor:[UIColor yellowColor]]; 
[[SVProgressHUD appearance] setHudFont:[UIFont fontWithName:@"MarkerFelt-Wide" size:16]];