5

我现在这个问题发布了更多次,但我还没有解决我的问题。就我而言,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()

我的 SVProgressHud 的屏幕截图

4

1 回答 1

9

只需调用此方法即可。

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

得到这样的输出

于 2017-09-06T11:09:59.767 回答