SBSDKAspectRatio

@interface SBSDKAspectRatio : NSObject

A class that describes an aspect ratio for a documents page. *

  • The width of the documents page. Unit independent. *

    Declaration

    Objective-C

    @property (nonatomic, readonly) double width;

    Swift

    var width: Double { get }
  • The height of the documents page. Unit independent. *

    Declaration

    Objective-C

    @property (nonatomic, readonly) double height;

    Swift

    var height: Double { get }
  • The aspect ratio of the receiver expressed as a double value of width divided by height. *

    Declaration

    Objective-C

    @property (nonatomic, readonly) double ratio;

    Swift

    var ratio: Double { get }
  • Designated initializer.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithWidth:(double)width andHeight:(double)height;

    Swift

    init(width: Double, andHeight height: Double)

    Parameters

    width

    The width of the documents page.

    height

    The height of the documents page.

  • Returns an inverted copy of the receiver. Inverted here means that width and height are swapped and therefore the resulting aspect ratio is the reciproke of the receivers aspect ratio.

    Declaration

    Objective-C

    - (nonnull instancetype)inverted;

    Swift

    func inverted() -> Self
  • Not available.

    Declaration

    Objective-C

    - (nonnull instancetype)init;