jdg / MBProgressHUD

MBProgressHUD + Customizations
http://www.bukovinski.com/
MIT License
16.01k stars 3.56k forks source link

label was gone #509

Closed littlemozart closed 6 years ago

littlemozart commented 7 years ago

Hi! I found the label was gone when I set "hud.bezelView.blurEffectStyle = .extraLight". I have tried to set the content color and label text color, but nothing works.

littlemozart commented 7 years ago

And another question, I set the hud appearance in app delegate, but it didn't work either.

matej commented 7 years ago

You need to provide exact reproduction steps (e.g., a test case or instructions on how how to modify the included Demo application or a sample project).

littlemozart commented 7 years ago

@matej Thank you for your reply. Here my codes are. let hud = MBProgressHUD.showAdded(to: self.parent!.view, animated: true) hud.mode = .customView hud.bezelView.blurEffectStyle = .extraLight

    hud.backgroundView.style = .solidColor
    hud.backgroundView.color = UIColor(white: 0.0, alpha: 0.3)

    hud.customView = UIImageView(image: #imageLiteral(resourceName: "Check"))
    hud.label.text = "Done"
    hud.isSquare = true
    hud.hide(animated: true, afterDelay: 5)

And the result simulator screen shot - iphone x - 2017-11-14 at 16 25 41 But now I have achieved my desired effect by setting the color of bezel view directly. Then I found another problem. I try to set the appearance of hud in app delegate, bun it didn't work for me. let appearence = MBProgressHUD.appearance() appearence.bezelView.style = .solidColor appearence.backgroundView.style = .solidColor appearence.bezelView.color = UIColor(white: 1.0, alpha: 0.9) appearence.backgroundView.color = UIColor(white: 0.0, alpha: 0.3)

matej commented 6 years ago

Fixed by https://github.com/jdg/MBProgressHUD/pull/525 and added a regression test.