我现在这个问题发布了更多次,但我还没有解决我的问题。在我的例子中,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这样的输出
关于ios - SVProgressHud 环形/前景色 IOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46073269/