RBLayoutPositionerResult Class Reference

Inherits from NSObject
Declared in RBLayoutPositionerResult.h

Overview

The result of a layout view positioning operation.

  frames

The calculated frame of each view in the given viewport. Array contains ‘NSValues that wrapCGRect`s.

@property (nonatomic, readonly, nonnull) NSArray<NSValue*> *frames

Declared In

RBLayoutPositionerResult.h

  contentSize

The content size for the calculated frames in the given viewport.

@property (nonatomic, readonly) CGSize contentSize

Declared In

RBLayoutPositionerResult.h

  recommendedContentSize

The recommended content size in the given viewport (i.e. with flexible spacing collapsed).

@property (nonatomic, readonly) CGSize recommendedContentSize

Declared In

RBLayoutPositionerResult.h

– initWithFrames:contentSize:

Initializes a new layout view positioning result.

- (nonnull instancetype)initWithFrames:(nonnull NSArray<NSValue*> *)frames contentSize:(CGSize)contentSize

Parameters

frames

The calculated frame of each view in the given viewport.

contentSize

The content size for the calculated frames in the given viewport.

Return Value

The initialized layout view positioning result.

Declared In

RBLayoutPositionerResult.h

– initWithFrames:contentSize:recommendedContentSize:

Initializes a new layout view positioning result.

- (nonnull instancetype)initWithFrames:(nonnull NSArray<NSValue*> *)frames contentSize:(CGSize)contentSize recommendedContentSize:(CGSize)recommendedContentSize

Parameters

frames

The calculated frame of each view in the given viewport.

contentSize

The content size for the calculated frames in the given viewport.

recommendedContentSize

The recommended content size in the given viewport (i.e. with flexible spacing collapsed).

Return Value

The initialized layout view positioning result.

Declared In

RBLayoutPositionerResult.h

– resultByApplyingMargin:

Adds a margin to the result, adjusting all frames and content sizes accordingly.

- (nonnull RBLayoutPositionerResult *)resultByApplyingMargin:(UIEdgeInsets)margin

Parameters

margin

The margin to add to the result.

Return Value

The updated RBLayoutPositionerResult object.

Declared In

RBLayoutPositionerResult.h