swit -> frosted glass effect

 

'

        let blurEffect = UIBlurEffect(style: .dark)
        //Then create a view that carries the blur effect
        let blurView = UIVisualEffectView(effect: blurEffect)
        //Set the size of the blurred view (full screen)
        blurView.frame = CGRect(x: 0, y: 0, width: screenHeight, height: screenHeight)
        blurView.alpha = 0.95
        oprCoverBackShot.addSubview(blurView)
        oprCoverBackShot.clipsToBounds = true;

        imageview.addSubview(oprCoverBackShot)

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326105054&siteId=291194637