iOS Developer Library — Pre-Release

Developer

UIKit Framework Reference UIBlurEffect Class Reference

Options
Deployment Target:

On This Page
Language:

UIBlurEffect

Inheritance


Conforms To


Import Statement


Swift

import UIKit

Objective-C

@import UIKit;

Availability


Available in iOS 8.0 and later.

A UIBlurEffect object applies a blurring effect to the content layered behind a UIVisualEffectView. Views added to the contentView of a UIVisualEffectView are not affected by the blur effect.

  • Creates a blur effect with the designated style.

    Declaration

    Swift

    init(style style: UIBlurEffectStyle) -> UIBlurEffect

    Objective-C

    + (UIBlurEffect *)effectWithStyle:(UIBlurEffectStyle)style

    Parameters

    style

    The intensity of the blur effect. See UIBlurEffectStyle for valid options.

    Return Value

    The blur effect to be used by a UIVisualEffectView object.

    Import Statement

    Objective-C

    @import UIKit;

    Swift

    import UIKit

    Availability

    Available in iOS 8.0 and later.

  • Blur styles available for UIBlurEffect objects.

    Declaration

    Swift

    enum UIBlurEffectStyle : Int { case ExtraLight case Light case Dark }

    Objective-C

    typedef enum { UIBlurEffectStyleExtraLight, UIBlurEffectStyleLight, UIBlurEffectStyleDark } UIBlurEffectStyle;

    Constants

    • ExtraLight

      UIBlurEffectStyleExtraLight

      Creates a blurring effect in the view. The area of the view is lighter in hue than the underlying view.

      Available in iOS 8.0 and later.

    • Light

      UIBlurEffectStyleLight

      Creates a blurring effect in the view. The area of the view is the same approximate hue of the underlying view.

      Available in iOS 8.0 and later.

    • Dark

      UIBlurEffectStyleDark

      Creates a blurring effect in the view. The area of the view is darker in hue than the underlying view.

      Available in iOS 8.0 and later.

    Import Statement

    Objective-C

    @import UIKit;

    Swift

    import UIKit

    Availability

    Available in iOS 8.0 and later.