iOS Developer Library — Pre-Release

Developer

UIKit Framework Reference UIVisualEffectView Class Reference

Options
Deployment Target:

On This Page
Language:

UIVisualEffectView

A UIVisualEffectView object gives you an easy way implement some complex visual effects. Depending on the desired effect, the effect may affect content layered behind the view or content added to the visual effect view’s contentView. More...

Inheritance


Import Statement


Swift

import UIKit

Objective-C

@import UIKit;

Availability


Available in iOS 8.0 and later.
  • A UIView object that can have a visual effect view added to it. (read-only)

    Declaration

    Swift

    var contentView: UIView { get }

    Objective-C

    @property(nonatomic, retain, readonly) UIView *contentView

    Discussion

    Add subviews to the contentView and not to UIVisualEffectView directly.

    Import Statement

    Swift

    import UIKit

    Availability

    Available in iOS 8.0 and later.

  • effect effect Property

    The visual effect provided by the view. (read-only)

    Declaration

    Swift

    @NSCopying var effect: UIVisualEffect { get }

    Objective-C

    @property(nonatomic, copy, readonly) UIVisualEffect *effect

    Discussion

    The effect is either a UIBlurEffect or a UIVibrancyEffect.

    Import Statement

    Swift

    import UIKit

    Availability

    Available in iOS 8.0 and later.

  • init(effect:) - initWithEffect: Designated Initializer

    Creates a new visual effect view with the designated visual effect.

    Declaration

    Swift

    init(effect effect: UIVisualEffect)

    Objective-C

    - (instancetype)initWithEffect:(UIVisualEffect *)effect

    Parameters

    effect

    The UIVisualEffect you provide for the view. This can be a UIBlurEffect or a UIVibrancyEffect.

    Return Value

    The new view containing the designated visual effect.

    Import Statement

    Swift

    import UIKit

    Availability

    Available in iOS 8.0 and later.