SBSDKAspectRatioRange

@interface SBSDKAspectRatioRange : NSObject

A class that represents a range of aspect ratios. *

  • Minimum aspect ratio. *

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) SBSDKAspectRatio *_Nonnull minimumAspectRatio;

    Swift

    var minimumAspectRatio: SBSDKAspectRatio { get }
  • Maximum aspect ratio. *

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) SBSDKAspectRatio *_Nonnull maximumAspectRatio;

    Swift

    var maximumAspectRatio: SBSDKAspectRatio { get }
  • Designated initializer. It takes two aspect ratio and compares them to get minimum and maximum ones.

    Declaration

    Objective-C

    - (nonnull instancetype)
        initWithAspectRatio1:(nonnull SBSDKAspectRatio *)aspectRatio1
                aspectRatio2:(nonnull SBSDKAspectRatio *)aspectRatio2;

    Swift

    init(aspectRatio1: SBSDKAspectRatio, aspectRatio2: SBSDKAspectRatio)

    Parameters

    aspectRatio1

    First aspect ratio.

    aspectRatio2

    Second aspect ratio.

  • Not available.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Checks wether the given aspect ratio is within the bounds of the receiver

    Declaration

    Objective-C

    - (BOOL)containsAspectRatio:(nonnull SBSDKAspectRatio *)aspectRatio;

    Swift

    func contains(_ aspectRatio: SBSDKAspectRatio) -> Bool

    Parameters

    aspectRatio

    The aspect ratio to be checked for containment.

    Return Value

    YES, if the aspect ration is within the bounds of the receiver. NO otherwise.