RBLayoutRelativePositionerCellSchema Class Reference

Inherits from NSObject
Declared in RBLayoutRelativePositionerCellSchema.h

Overview

Describes the relative layout to apply to a view. Provides a FLUENT API interface to allow chaining.

  identifier

Internally used identifier.

@property (nonatomic, nonnull, readonly) NSString *identifier

Declared In

RBLayoutRelativePositionerCellSchema.h

  view

The UIView that is to be layed out.

@property (nonatomic, nonnull, readonly) UIView *view

Declared In

RBLayoutRelativePositionerCellSchema.h

  useEdgeAndRelativeAlignment

Whether or not to use edge and relative alignments. Default = YES. If set to yes the the properties anchorToEdges, toTopOf, toTopEdgeOf, toLeftOf, toLeftEdgeOf, toBottomOf, toBottomEdgeOf, toRightOf, toRightEdgeOf are made use of. If this is NO then the verticalAlignment and horizontalAlignment properties only are used to layout the view.

@property (nonatomic) BOOL useEdgeAndRelativeAlignment

Declared In

RBLayoutRelativePositionerCellSchema.h

  sizeWidthToZeroIfHidden

Whether or not to assume the width of the view to be zero if the views hidden property is set. If this is YES instead of using the initial width size of the view as obtained from sizeThatFits or useExplicitSize a size of 0 will be used instead. Default = NO. Note if this is set width paddings and margins will not be applied.

@property (nonatomic) BOOL sizeWidthToZeroIfHidden

Declared In

RBLayoutRelativePositionerCellSchema.h

  sizeHeightToZeroIfHidden

Whether or not to assume the width of the view to be zero if the views hidden property is set. If this is YES instead of using the initial width size of the view as obtained from sizeThatFits or useExplicitSize a size of 0 will be used instead. Default = NO. Note if this is set width paddings and margins will not be applied.

@property (nonatomic) BOOL sizeHeightToZeroIfHidden

Declared In

RBLayoutRelativePositionerCellSchema.h

  useExplicitSize

The explicit non-empty size to use for the initial view size instead of the size obtained via sizeThatFits. If both a non-zero width and height are provided both values will be used. If only a single non-zero value is provided e.g. the width only the height will be set to that obtained via sizeThatFits. Default = CGSizeZero.

@property (nonatomic) CGSize useExplicitSize

Declared In

RBLayoutRelativePositionerCellSchema.h

  toTopOf

The UIView above which the view should be arranged.

@property (nonatomic, nullable) UIView *toTopOf

Declared In

RBLayoutRelativePositionerCellSchema.h

  toTopEdgeOf

The UIView above which the view should be arranged.

@property (nonatomic, nullable) UIView *toTopEdgeOf

Declared In

RBLayoutRelativePositionerCellSchema.h

  toLeftOf

The UIView to the left of which the view should be arranged.

@property (nonatomic, nullable) UIView *toLeftOf

Declared In

RBLayoutRelativePositionerCellSchema.h

  toLeftEdgeOf

The UIView to the left of which the view should be arranged.

@property (nonatomic, nullable) UIView *toLeftEdgeOf

Declared In

RBLayoutRelativePositionerCellSchema.h

  toBottomOf

The UIView below which the view should be arranged.

@property (nonatomic, nullable) UIView *toBottomOf

Declared In

RBLayoutRelativePositionerCellSchema.h

  toBottomEdgeOf

The UIView below which the view should be arranged.

@property (nonatomic, nullable) UIView *toBottomEdgeOf

Declared In

RBLayoutRelativePositionerCellSchema.h

  toRightOf

The UIView to the right of which the view should be arranged.

@property (nonatomic, nullable) UIView *toRightOf

Declared In

RBLayoutRelativePositionerCellSchema.h

  toRightEdgeOf

The UIView to the right of which the view should be arranged.

@property (nonatomic, nullable) UIView *toRightEdgeOf

Declared In

RBLayoutRelativePositionerCellSchema.h

  toVerticalCenterOf

The UIView to the center of which the view should be arranged. If set then toTop and toBottom are ignored.

@property (nonatomic, nullable) UIView *toVerticalCenterOf

Declared In

RBLayoutRelativePositionerCellSchema.h

  toHorizontalCenterOf

The UIView to the center of which the view should be arranged. If set then toRight and toLeft are ignored.

@property (nonatomic, nullable) UIView *toHorizontalCenterOf

Declared In

RBLayoutRelativePositionerCellSchema.h

  widthOf

Attempts to set the width of the view to match width of the reference view * widthMultiplier. Note you may reference self. Useful for exmaple if you would like to have the width match the height of the view.

@property (nonatomic, nullable) UIView *widthOf

Declared In

RBLayoutRelativePositionerCellSchema.h

  widthOfMultiplier

The multipler to use in conjunction with the widthOf property. Default = 1.0.

@property (nonatomic) CGFloat widthOfMultiplier

Declared In

RBLayoutRelativePositionerCellSchema.h

  widthOfUseWidth

Indicates that the width of the view pointed to be widthOf should be used. If this is NO then the height will be used. Default = YES.

@property (nonatomic) BOOL widthOfUseWidth

Declared In

RBLayoutRelativePositionerCellSchema.h

  heightOfMultiplier

The multipler to use in conjunction with the heightOf property. Default = 1.0.

@property (nonatomic) CGFloat heightOfMultiplier

Declared In

RBLayoutRelativePositionerCellSchema.h

  heightOfUseHeight

Indicates that the height of the view pointed to be heightOf should be used. If this is NO then the width will be used. Default = YES.

@property (nonatomic) BOOL heightOfUseHeight

Declared In

RBLayoutRelativePositionerCellSchema.h

  heightOf

Attempts to set the height of the view to match height of the reference view * heightMultiplier. Note you may reference self. Useful for exmaple if you would like to have the height match the width of the view.

@property (nonatomic, nullable) UIView *heightOf

Declared In

RBLayoutRelativePositionerCellSchema.h

  anchorToEdges

The sides of the view that should be anchored to the parent container view. Note this takes precedant over any to*Of assignments. Used when useEdgeAndRelativeAlignment = YES.

@property (nonatomic) UIRectEdge anchorToEdges

Declared In

RBLayoutRelativePositionerCellSchema.h

  verticalAlignment

Where to place the view vertically. Used only when useEdgeAndRelativeAlignment = NO.

@property (nonatomic) RBVerticalAlignment verticalAlignment

Declared In

RBLayoutRelativePositionerCellSchema.h

  horizontalAlignment

Where to place the view horizontally. Used only when useEdgeAndRelativeAlignment = NO.

@property (nonatomic) RBHorizontalAlignment horizontalAlignment

Declared In

RBLayoutRelativePositionerCellSchema.h

  margin

The margin around the view. Has the effect of decreasing the size of the contents.

@property (nonatomic) UIEdgeInsets margin

Declared In

RBLayoutRelativePositionerCellSchema.h

  effectiveMargin

The margin to be applied after taking into account the properties that have been applied e.g. sizeWidthToZeroIfHidden. This is used for internal calculations.

@property (nonatomic, readonly) UIEdgeInsets effectiveMargin

Declared In

RBLayoutRelativePositionerCellSchema.h

  padding

The padding that should be added around the view bounds. Should contain positive values only. Important views are laid out against other views with padding taken into account.

@property (nonatomic) UIEdgeInsets padding

Declared In

RBLayoutRelativePositionerCellSchema.h

  effectivePadding

The padding to be applied after taking into account the properties that have been applied e.g. sizeWidthToZeroIfHidden. This is used for internal calculations.

@property (nonatomic, readonly) UIEdgeInsets effectivePadding

Declared In

RBLayoutRelativePositionerCellSchema.h

+ withView:

Creates a new RBLayoutRelativePositionerCellSchema using the supplied view.

+ (nonnull instancetype)withView:(nonnull UIView *)view

Parameters

view

The view.

Return Value

The created schema.

Declared In

RBLayoutRelativePositionerCellSchema.h

– initWithView:

Initializes a new RBLayoutRelativePositionerCellSchema using the supplied view.

- (nonnull instancetype)initWithView:(nonnull UIView *)view

Parameters

view

The view.

Return Value

The initialized schema.

Declared In

RBLayoutRelativePositionerCellSchema.h

– useEdgeAndRelativeAlignment:

Sets the type of layout to use.

- (nonnull instancetype)useEdgeAndRelativeAlignment:(BOOL)useEdgeAndRelativeAlignment

Parameters

useEdgeAndRelativeAlignment

Whether or not to use edge and relative layout or to use normal horizontal/vertical alignment only.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– sizeWidthToZeroIfHidden:

Indicates that the width of the view should be set to zero if the view is hidden.

- (nonnull instancetype)sizeWidthToZeroIfHidden:(BOOL)sizeWidthToZeroIfHidden

Parameters

sizeWidthToZeroIfHidden

Wheter or not to set the view width to zero if it’s hidden.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– sizeHeightToZeroIfHidden:

Indicates that the height of the view should be set to zero if the view is hidden.

- (nonnull instancetype)sizeHeightToZeroIfHidden:(BOOL)sizeHeightToZeroIfHidden

Parameters

sizeHeightToZeroIfHidden

Wheter or not to set the view height to zero if it’s hidden.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– useExplicitSize:

Sets a specific size to be used for the view (ignoring any value that the view itself may determine).

- (nonnull instancetype)useExplicitSize:(CGSize)useExplicitSize

Parameters

useExplicitSize

The size to use.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– anchorToEdges:

Anchors the views sides to the edges of its container view.

- (nonnull instancetype)anchorToEdges:(UIRectEdge)anchorToEdges

Parameters

anchorToEdges

The edges to which the view should be anchored.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– toTopOf:

Arranges the view to the top of the view that has been provided.

- (nonnull instancetype)toTopOf:(nullable UIView *)toTopOf

Parameters

toTopOf

The view to arrange around.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– toLeftOf:

Arranges the view to the left of the view that has been provided.

- (nonnull instancetype)toLeftOf:(nullable UIView *)toLeftOf

Parameters

toLeftOf

The view to arrange around.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– toBottomOf:

Arranges the view to the bottom of the view that has been provided.

- (nonnull instancetype)toBottomOf:(nullable UIView *)toBottomOf

Parameters

toBottomOf

The view to arrange around.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– toRightOf:

Arranges the view to the right of the view that has been provided.

- (nonnull instancetype)toRightOf:(nullable UIView *)toRightOf

Parameters

toRightOf

The view to arrange around.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– toTopEdgeOf:

Arranges the view to the top edge of the view that has been provided.

- (nonnull instancetype)toTopEdgeOf:(nullable UIView *)toTopEdgeOf

Parameters

toTopEdgeOf

The view to arrange around.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– toLeftEdgeOf:

Arranges the view to the left edge of the view that has been provided.

- (nonnull instancetype)toLeftEdgeOf:(nullable UIView *)toLeftEdgeOf

Parameters

toLeftEdgeOf

The view to arrange around.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– toBottomEdgeOf:

Arranges the view to the bottom edge of the view that has been provided.

- (nonnull instancetype)toBottomEdgeOf:(nullable UIView *)toBottomEdgeOf

Parameters

toBottomEdgeOf

The view to arrange around.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– toRightEdgeOf:

Arranges the view to the right edge of the view that has been provided.

- (nonnull instancetype)toRightEdgeOf:(nullable UIView *)toRightEdgeOf

Parameters

toRightEdgeOf

The view to arrange around.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– toVerticalCenterOf:

Arranges the view vertically centered to the view that has been provided.

- (nonnull instancetype)toVerticalCenterOf:(nullable UIView *)toVerticalCenterOf

Parameters

toVerticalCenterOf

The view to arrange around.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– toHorizontalCenterOf:

Arranges the view horizontally centered to the view that has been provided.

- (nonnull instancetype)toHorizontalCenterOf:(nullable UIView *)toHorizontalCenterOf

Parameters

toHorizontalCenterOf

The view to arrange around.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– widthOf:

Sets the width of the view to equal that of the view that has been provided.

- (nonnull instancetype)widthOf:(nullable UIView *)widthOf

Parameters

widthOf

The view to size against.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– widthOfMultiplier:

Multiplies the width of the view by the amount specified.

- (nonnull instancetype)widthOfMultiplier:(CGFloat)widthOfMultiplier

Parameters

widthOfMultiplier

The multiplier.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– widthOfUseWidth:

Used in conjuction with the method widthOf. Indicates that the width should equal the width or height of the view that has been set by widthOf.

- (nonnull instancetype)widthOfUseWidth:(BOOL)widthOfUseWidth

Parameters

widthOfUseWidth

Use the width (YES) or height (NO) of the view pointed to bywidthOf`.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– heightOf:

Sets the height of the view to equal that of the view that has been provided.

- (nonnull instancetype)heightOf:(nullable UIView *)heightOf

Parameters

heightOf

The view to size against.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– heightOfMultiplier:

Multiplies the height of the view by the amount specified.

- (nonnull instancetype)heightOfMultiplier:(CGFloat)heightOfMultiplier

Parameters

heightOfMultiplier

The multiplier.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– heightOfUseHeight:

Used in conjuction with the method heightOf. Indicates that the height should equal the width or height of the view that has been set by heightOf.

- (nonnull instancetype)heightOfUseHeight:(BOOL)heightOfUseHeight

Parameters

heightOfUseHeight

Use the height (YES) or width (NO) of the view pointed to byheightOf`.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– padding:

The padding to apply around the view (should not contain values < 0). Will increase the size of the view. The padding is added at the end of the layout calculation meaning it has not been added to the size of the cell during arrangments and sizing.

- (nonnull instancetype)padding:(UIEdgeInsets)padding

Parameters

padding

The padding.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– margin:

The margin to apply around the view (should not contain values < 0). Will decrease the size of the view. The margin is added at the end of the layout calculation meaning it has not been added to the size of the cell during arrangments and sizing.

- (nonnull instancetype)margin:(UIEdgeInsets)margin

Parameters

margin

The margin.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– horizontalAlignment:

Arranges the view horizontally within the parent view.

- (nonnull instancetype)horizontalAlignment:(RBHorizontalAlignment)horizontalAlignment

Parameters

horizontalAlignment

The horizontal alignment.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h

– verticalAlignment:

Arranges the view vertically within the parent view.

- (nonnull instancetype)verticalAlignment:(RBVerticalAlignment)verticalAlignment

Parameters

verticalAlignment

The vertical alignment.

Return Value

The cell schema to allow joining method calls.

Declared In

RBLayoutRelativePositionerCellSchema.h