2017-09-06 93 views
1

我现在这个问题发布了更多的时间,但我还没有解决我的问题。在我的情况下,foregroundColor不起作用。 Ring不会以darkGray颜色显示,即使foregroundColor也不会选择任何颜色。请查看我的代码并帮助我。由于SVProgressHud环/前景色IOS

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

+0

输出看到我更新的答案。 –

回答

1

仅仅只有调用此方法。

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

+0

是的,但我想要红色或灰色的戒指。可能吗? –

+0

@MuhammadUsman根据你的喜好改变颜色。 –

+0

我已经使用了您提供的相同代码。该代码已改变背景图层颜色和背景颜色,但环没有出现像我附上问题截图。 –