2016-12-21 1 views
2

Je veux montrer à la fois la couleur de l'anneau et du texte de Hud différemment. J'utilise hud style SVProgressHUDStyleCustom, mais incapable d'atteindre le résultat souhaité.Comment changer la couleur de l'anneau et du texte en utilisant SVProgressHUDStyleCustom

Mon code est le suivant:

[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]]; 

Toute aide sera la bienvenue.

Répondre

0

Essayez cette

[[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

Ce code ne fonctionne pas avec la dernière 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]];