RBLayoutFlexiPositionerCellSchema Class Reference

Inherits from NSObject
Declared in RBLayoutFlexiPositionerCellSchema.h

Overview

Describes the sizing and layout characteristics for a cell.

Provides the ability to convert a string into a RBLayoutFlexiPositionerCellSchema.

Other Methods

  isEmpty

Indicates that this cell is empty. If a cell is marked empty the RBLayoutFlexiPositionerCell will ‘skip’ over this cell when adding content items.

@property (nonatomic, readonly) BOOL isEmpty

Declared In

RBLayoutFlexiPositionerCellSchema.h

  horizontalMetric

A RBLayoutFlexiPositionerMetricSchema detailing the sizing for the horizontal orientation. This must be set for a cell.

@property (nonatomic, readonly, nonnull) RBLayoutFlexiPositionerMetricSchema *horizontalMetric

Declared In

RBLayoutFlexiPositionerCellSchema.h

  verticalMetric

A RBLayoutFlexiPositionerMetricSchema detailing the sizing for the vertical orientation. This is optional and may be set to as nil.

@property (nonatomic, readonly, nullable) RBLayoutFlexiPositionerMetricSchema *verticalMetric

Declared In

RBLayoutFlexiPositionerCellSchema.h

  fillToWidth

Indicates content within a cell should fill the available width.

@property (nonatomic, readonly) BOOL fillToWidth

Declared In

RBLayoutFlexiPositionerCellSchema.h

  fillToHeight

Indicates content within a cell should fill the available height.

@property (nonatomic, readonly) BOOL fillToHeight

Declared In

RBLayoutFlexiPositionerCellSchema.h

  margin

The margin around the content of the cell.

@property (nonatomic, readonly) UIEdgeInsets margin

Declared In

RBLayoutFlexiPositionerCellSchema.h

  verticalAlignment

Determines the anchor position for content within a cell in the vertical orientation.

@property (nonatomic, readonly) RBVerticalAlignment verticalAlignment

Declared In

RBLayoutFlexiPositionerCellSchema.h

  horizontalAlignment

Determines the anchor position for content within a cell in the horizontal orientation.

@property (nonatomic, readonly) RBHorizontalAlignment horizontalAlignment

Declared In

RBLayoutFlexiPositionerCellSchema.h

– initWithHorizontalMetricValue:optionalVerticalMetricValue:verticalAlignment:horizontalAlignment:fillToWidth:fillToHeight:margin:isEmpty:

Initializes a new RBLayoutFlexiPositionerCellSchema object describing the sizing and layout characteristics for a cell.

- (nonnull instancetype)initWithHorizontalMetricValue:(nonnull RBLayoutFlexiPositionerMetricSchema *)horizontalMetric optionalVerticalMetricValue:(nullable RBLayoutFlexiPositionerMetricSchema *)verticalMetric verticalAlignment:(RBVerticalAlignment)verticalAlignment horizontalAlignment:(RBHorizontalAlignment)horizontalAlignment fillToWidth:(BOOL)fillToWidth fillToHeight:(BOOL)fillToHeight margin:(UIEdgeInsets)margin isEmpty:(BOOL)isEmpty

Parameters

horizontalMetric

The horizontal sizing details. Required.

verticalMetric

The vertical sizing details. Optional, may be set as nil.

verticalAlignment

The vertical anchoring position for the cell content.

horizontalAlignment

The horizontal anchoring position for the cell content.

fillToWidth

Ensure content fills available width.

fillToHeight

Ensure content fills available height.

margin

Margin around cell content.

isEmpty

Indicates the cell should not contain content.

Return Value

A newly initialized RBLayoutFlexiPositionerCellSchema object representing sizing and layout characteristics for a cell.

Declared In

RBLayoutFlexiPositionerCellSchema.h

– initWithSchemaDictionary:

Initializes a new RBLayoutFlexiPositionerCellSchema object from a schema dictionary.

- (nonnull instancetype)initWithSchemaDictionary:(nonnull NSDictionary<NSString*,id> *)schemaDictionary

Parameters

schemaDictionary

A dictionary containing the key cells that contains an array of cell data.

Return Value

A newly initialized RBLayoutFlexiPositionerCellSchema object representing sizing and layout characteristics for a cell.

Declared In

RBLayoutFlexiPositionerCellSchema.h

– schemaDictionary

Returns a representation of the sizing and layout of this instance as a schema dictionary.

- (nonnull NSDictionary<NSString*,id> *)schemaDictionary

Return Value

The schema as an NSDictionary

Declared In

RBLayoutFlexiPositionerCellSchema.h

+ emptyFlexibleCell

Convenience class method that returns an empty flexi cell with a minimum and maximum absolute pt value set to 0.

+ (nonnull instancetype)emptyFlexibleCell

Return Value

A newly created RBLayoutFlexiPositionerCellSchema representing an empty flexi cell with a minimum and maximum absolute pt value set to 0.

Declared In

RBLayoutFlexiPositionerCellSchema.h

+ emptyFlexibleCellWithMinimumSize:maximumSize:

Convenience class method that returns an empty flexi cell representation using the provided minimum and maximum absolute widths.

+ (nonnull instancetype)emptyFlexibleCellWithMinimumSize:(CGFloat)minimumSize maximumSize:(CGFloat)maximumSize

Parameters

minimumSize

The minimum size as a pt value. Setting 0 ignores this value.

maximumSize

The maximum size as a pt value. Setting 0 ignores this value.

Return Value

A newly created RBLayoutFlexiPositionerCellSchema representing an empty flexi cell with a minimum and maximum absolute pt value.

Declared In

RBLayoutFlexiPositionerCellSchema.h

StringSerialisation Methods

– initWithString:

Initializes a new RBLayoutFlexiPositionerCellSchema object from an NSString.

- (nonnull instancetype)initWithString:(nonnull NSString *)string

Parameters

string

A string representation of the cell schema.

Return Value

A newly initialized RBLayoutFlexiPositionerCellSchema object.

Declared In

RBLayoutFlexiPositionerSchema+StringSerialisation.h