pkluz / PKHUD

A Swift based reimplementation of the Apple HUD (Volume, Ringer, Rotation,…) for iOS 8.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dimsBackground is false,but PKHUD.sharedHUD not hidden container.backgroundView

xdkhan opened this issue · comments

if last show container.backgroundView, and hide animated is false, container.backgroundView not hidden.

then dimsBackground set false, container.backgroundView hidden status not change true

open func show(onView view: UIView? = nil) {
        let view: UIView = view ?? viewToPresentOn ?? UIApplication.shared.keyWindow!
        if  !view.subviews.contains(container) {
            view.addSubview(container)
            container.frame.origin = CGPoint.zero
            container.frame.size = view.frame.size
            container.autoresizingMask = [ .flexibleHeight, .flexibleWidth ]
            container.isHidden = true
        }
        if dimsBackground {
            container.showBackground(animated: true)
        }
// dimsBackground == false, this not call  container.hideBackground(animated: false)