SVProgressHud Ring/Foreground 颜色 IOS

SVProgressHud Ring/Foreground Color IOS

我现在这个问题发布了更多次,但我还没有解决我的问题。在我的例子中,foregroundColor 不工作。即使 foregroundColor 没有选择任何颜色,环也不会出现 darkGray 颜色。请查看我的代码并帮助我。谢谢

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()

只调用此方法即可。

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

的输出