1

I am using MBProgressHUD and want to make the bezelView to br transparent.

import UIKit
import MBProgressHUD

class ProgressBarManager {
   func showProgressBar() {
    guard let testView = UIApplication.shared.windows.last else { return }        
    let hud = MBProgressHUD.showAdded(to: testView, animated: true)

    hud.bezelView.layer.cornerRadius = 5
    hud.bezelView.backgroundColor = .clear
    hud.backgroundView.style = .solidColor
    hud.backgroundView.color = UIColor(white: 0, alpha: 0.3)

 }
}

Yet the bezelView still shows:

enter image description here

Is there a way to hide it?

ironRoei
  • 2,049
  • 24
  • 45

2 Answers2

0

Add this line for your hud init code:

hud.bezelView.style = .solidColor
Denis Kozhukhov
  • 1,205
  • 8
  • 16
0

After HUD init, set it up with:

hud.bezelView.style = .solidColor
hud.bezelView.color = .clear
Mojtaba Hosseini
  • 95,414
  • 31
  • 268
  • 278