Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Adding Blur effect in swift

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 484
    Comment on it

    Hello friends,

    To add blur effect in swift you may use the following code:

    IBAction func blurImage(sender: AnyObject) {
        // 1 Create an object of UIBlurEffect,you may change the value of style as per your requirement

    var darkBlur = UIBlurEffect(style: UIBlurEffectStyle.Dark) // 2Create an object UIVisualEffectView with the object of UIBlurEffect

    var blurView = UIVisualEffectView(effect: darkBlur) blurView.frame = imageView.bounds // 3 Add the blurview to the imageview or any other object you want to blur

    imageView.addSubview(blurView)

    }

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: