2017-09-06 26 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

我已經使用了您提供的相同代碼。該代碼已改變背景圖層顏色和背景顏色,但環沒有出現像我附上問題截圖。 –