SVProgressHud Ring / Foreground Color IOS

时间:2017-09-06 10:49:20

标签: ios swift svprogresshud

我现在这个问题发布了很多次,但我没有解决我的问题。在我的情况下,foregroundColor无法正常工作。即使foregroundColor没有选择任何颜色,环也不会出现暗灰色。请查看我的代码并帮助我。感谢

import SVProgressHUD
//import SVProgressHud on top

SVProgressHUD.setDefaultStyle(.custom)
SVProgressHUD.setDefaultMaskType(.custom)
SVProgressHUD.setMinimumSize(CGSize(width: 60, height: 60))
SVProgressHUD.setRingThickness(3)
SVProgressHUD.setRingNoTextRadius(20)
SVProgressHUD.setBackgroundColor(UIColor.white)
SVProgressHUD.setForegroundColor(UIColor.darkGray)
SVProgressHUD.show()

ScreenShot of my SVProgressHud

1 个答案:

答案 0 :(得分:3)

只调用此方法。

SVProgressHUD.setDefaultStyle(.custom)
SVProgressHUD.setDefaultMaskType(.custom)
SVProgressHUD.setForegroundColor(UIColor.red)           //Ring Color
SVProgressHUD.setBackgroundColor(UIColor.yellow)        //HUD Color
SVProgressHUD.setBackgroundLayerColor(UIColor.green)    //Background Color
SVProgressHUD.show()

获得类似this

的输出
相关问题