Git Product home page Git Product logo

Comments (3)

XudongLiuHarold avatar XudongLiuHarold commented on June 15, 2024

I got this problem too & also don't know what happened. But it still works well, so I just ignore it

from pkhud.

FroeMic avatar FroeMic commented on June 15, 2024

The origin of this problem is described here: http://stackoverflow.com/questions/26325141/xcode-warning-this-will-cause-the-effect-to-appear-broken-until-opacity-return

The problems are the following 3 lines of code in the following methods in 'Window.swift'

internal func showFrameView() {

       layer.removeAllAnimations()
        makeKeyAndVisible()
        frameView.center = center

        // ------------------------------
        // currently
        frameView.alpha = 1.0 
        // how it should be
        frameView.backgroundColor = frameView.backgroundColor?.colorWithAlphaComponent(1.0)
        // ------------------------------

        hidden = false
    }

and

internal func hideFrameView(animated anim: Bool, completion: ((Bool) -> Void)? = nil) {
        let finalize: (finished: Bool) -> (Void) = { finished in
            if finished {
                self.hidden = true
                self.resignKeyWindow()
            }

            self.willHide = false
            completion?(finished)
        }

        if hidden {
            return
        }

        willHide = true

        if anim {
            UIView.animateWithDuration(0.8, animations: {

                 // ------------------------------
                // currently, causes error message
                self.frameView.alpha = 0.0 
                 // how it should be
                self.frameView.backgroundColor = self.frameView.backgroundColor?.colorWithAlphaComponent(0.0)
                // ------------------------------

                self.hideBackground(animated: false) 
            }, completion: finalize)
        } else {

            // ------------------------------
            // currently, causes error message
            self.frameView.alpha = 0.0 
             // how it should be
            self.frameView.backgroundColor = self.frameView.backgroundColor?.colorWithAlphaComponent(0.0)
             // ------------------------------

            finalize(finished: true)
        }
    }

from pkhud.

pkluz avatar pkluz commented on June 15, 2024

Please see #6 - There's an idea for a workaround (nesting the view in a containing UIView and animating that one), but I haven't gotten to implementing yet.

from pkhud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.