2016-12-21 74 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]];