SASParallaxMargins

Objective-C

@interface SASParallaxMargins : NSObject

Swift

class SASParallaxMargins : NSObject

Represents the margins to apply to parallax ads.

  • The left margin to be applied to the parallax.

    Declaration

    Objective-C

    @property (readonly) CGFloat left;

    Swift

    var left: CGFloat { get }
  • top

    The top margin to be applied to the parallax.

    Declaration

    Objective-C

    @property (readonly) CGFloat top;

    Swift

    var top: CGFloat { get }
  • The right margin to be applied to the parallax.

    Declaration

    Objective-C

    @property (readonly) CGFloat right;

    Swift

    var right: CGFloat { get }
  • The bottom margin to be applied to the parallax.

    Declaration

    Objective-C

    @property (readonly) CGFloat bottom;

    Swift

    var bottom: CGFloat { get }
  • Returns an initialized SASParallaxMargins object.

    Declaration

    Objective-C

    + (nonnull instancetype)parallaxMarginsWithLeft:(CGFloat)left
                                                top:(CGFloat)top
                                              right:(CGFloat)right
                                             bottom:(CGFloat)bottom;

    Parameters

    left

    The left margin.

    top

    The top margin.

    right

    The right margin.

    bottom

    The bottom margin.

    Return Value

    An initialized instance of SASParallaxMargins.

  • Returns a new parallax margins instance representing the addition of this instance and the instance provided as parameter.

    Declaration

    Objective-C

    - (nonnull SASParallaxMargins *)parallaxMarginsByAddingParallaxMargins:
        (nonnull SASParallaxMargins *)otherParallaxMargins;

    Swift

    func adding(_ otherParallaxMargins: SASParallaxMargins) -> SASParallaxMargins

    Parameters

    otherParallaxMargins

    The parallax margins instance to be added to the current one.

    Return Value

    A new parallax margins instance representing the addition of this instance and the instance provided as parameter.

  • Initialize a new instance of SASParallaxMargins.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithLeft:(CGFloat)left
                                     top:(CGFloat)top
                                   right:(CGFloat)right
                                  bottom:(CGFloat)bottom;

    Swift

    init(left: CGFloat, top: CGFloat, right: CGFloat, bottom: CGFloat)

    Parameters

    left

    The left margin.

    top

    The top margin.

    right

    The right margin.

    bottom

    The bottom margin.

    Return Value

    An initialized instance of SASParallaxMargins.