RBLayoutFlexiPositionerMetricSchema Class Reference

Inherits from NSObject
Declared in RBLayoutFlexiPositionerMetricSchema.h

Overview

Describes how sizing and sizing values should be calculated for an orientation when used for a row or cell.

Provides the ability to convert a string into a RBLayoutFlexiPositionerMetricSchema.

Other Methods

  sizingMode

The sizing mode for this instance.

@property (nonatomic, readonly) RBLayoutFlexiPositionerSizingMode sizingMode

Declared In

RBLayoutFlexiPositionerMetricSchema.h

  flexibleSizingModeWeightingPercentage

Provides a weighting bias when distributing available flexible spacing amongst other flexible metrics. Optional, percentage value (0.0 - 1.0).

@property (nonatomic, readonly) CGFloat flexibleSizingModeWeightingPercentage

Declared In

RBLayoutFlexiPositionerMetricSchema.h

  sizingValue

The size. Specified as an absolute pt value or 0.0 - 1.0 percentage value (depending on sizingValueIsAbsolute field)

@property (nonatomic, readonly) CGFloat sizingValue

Declared In

RBLayoutFlexiPositionerMetricSchema.h

  sizingValueIsAbsolute

Indicates that the sizingValue value should be interpreted as an absolute pt value or a percentage. Default set as YES

@property (nonatomic, readonly) BOOL sizingValueIsAbsolute

Declared In

RBLayoutFlexiPositionerMetricSchema.h

  sizingValueMinimum

The minimum size. Optional, a value of 0 indicates this should be ignored. Specified as an absolute pt value or 0.0 - 1.0 percentage value (depending on sizingValueMinimumIsAbsolute field).

@property (nonatomic, readonly) CGFloat sizingValueMinimum

Declared In

RBLayoutFlexiPositionerMetricSchema.h

  sizingValueMinimumIsAbsolute

Indicates that the sizingValueMinimum value should be interpreted as an absolute pt value or a percentage. Default set as YES

@property (nonatomic, readonly) BOOL sizingValueMinimumIsAbsolute

Declared In

RBLayoutFlexiPositionerMetricSchema.h

  sizingValueMaximum

The maximum size. Optional, a value of 0 indicates this should be ignored. Specified as an absolute pt value or 0.0 - 1.0 percentage value (depending on sizingValueMaximumIsAbsolute field)

@property (nonatomic, readonly) CGFloat sizingValueMaximum

Declared In

RBLayoutFlexiPositionerMetricSchema.h

  sizingValueMaximumIsAbsolute

Indicates that the sizingValueMaximum value should be interpreted as an absolute pt value or a percentage. Default set as YES

@property (nonatomic, readonly) BOOL sizingValueMaximumIsAbsolute

Declared In

RBLayoutFlexiPositionerMetricSchema.h

– initWithSchemaDictionary:

Initializes a new RBLayoutFlexiPositionerMetricSchema object from a schema dictionary.

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

Parameters

schemaDictionary

A dictionary containing keys that provide specifc data for populating an instance. Expects the following keys in the dictionary: - sizingMode that provides an number value - flexibleSizingModeWeightingPercentage that provides an NSNumber value (0.0 - 1.0) - sizingValue that provides an NSNumber value - sizingValueIsAbsolute that provides an NSNumber value boolean - sizingValueMinimum that provides an NSNumber value - sizingValueMinimumIsAbsolute that provides an NSNumber value boolean - sizingValueMaximum that provides an NSNumber value - sizingValueMaximumIsAbsolute that provides an NSNumber value boolean

Return Value

A newly initialized RBLayoutFlexiPositionerMetricSchema object representing sizing data for a orientation.

Declared In

RBLayoutFlexiPositionerMetricSchema.h

– schemaDictionary

Returns a representation of sizing data of this instance as a schema dictionary.

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

Return Value

The schema as an NSDictionary

Declared In

RBLayoutFlexiPositionerMetricSchema.h

+ autosize

Convenience class method that returns an autosize mode metric.

+ (nonnull instancetype)autosize

Return Value

A newly created RBLayoutFlexiPositionerMetricSchema.

Declared In

RBLayoutFlexiPositionerMetricSchema.h

+ autosizeWithAbsoluteMinimum:maximum:

Convenience class method that returns an autosize mode metric using the provided minimum and maximum absolute pt values.

+ (nonnull instancetype)autosizeWithAbsoluteMinimum:(CGFloat)minimum maximum:(CGFloat)maximum

Parameters

minimum

The minimum absolute pt value, 0 ignores.

maximum

The maximum absolute pt value, 0 ignores.

Return Value

A newly created RBLayoutFlexiPositionerMetricSchema.

Declared In

RBLayoutFlexiPositionerMetricSchema.h

+ absoluteWithValue:

Convenience class method that returns a fixed mode metric using the provided sizing value.

+ (nonnull instancetype)absoluteWithValue:(CGFloat)value

Parameters

value

The absolute pt sizing value.

Return Value

A newly created RBLayoutFlexiPositionerMetricSchema.

Declared In

RBLayoutFlexiPositionerMetricSchema.h

+ absoluteWithValue:minimum:maximum:

Convenience class method that returns a fixed mode metric using the provided sizing, minimum and maximum absolute pt values.

+ (nonnull instancetype)absoluteWithValue:(CGFloat)value minimum:(CGFloat)minimum maximum:(CGFloat)maximum

Parameters

value

The absolute pt sizing value.

minimum

The minimum absolute pt value, 0 ignores.

maximum

The maximum absolute pt value, 0 ignores.

Return Value

A newly created RBLayoutFlexiPositionerMetricSchema.

Declared In

RBLayoutFlexiPositionerMetricSchema.h

+ percentageWithValue:

Convenience class method that returns a fixed mode metric using the provided sizing percentage value.

+ (nonnull instancetype)percentageWithValue:(CGFloat)value

Parameters

value

The percentage sizing value (0.0 - 1.0).

Return Value

A newly created RBLayoutFlexiPositionerMetricSchema.

Declared In

RBLayoutFlexiPositionerMetricSchema.h

+ percentageWithValue:minimum:maximum:

Convenience class method that returns a fixed mode metric using the provided sizing, minimum and maximum percentage values.

+ (nonnull instancetype)percentageWithValue:(CGFloat)value minimum:(CGFloat)minimum maximum:(CGFloat)maximum

Parameters

value

The percentage sizing value (0.0 - 1.0).

minimum

The minimum percentage sizing value (0.0 - 1.0), 0 ignores.

maximum

The maximum percentage sizing value (0.0 - 1.0), 0 ignores.

Return Value

A newly created RBLayoutFlexiPositionerMetricSchema.

Declared In

RBLayoutFlexiPositionerMetricSchema.h

+ flexible

Convenience class method that returns a flexible mode metric.

+ (nonnull instancetype)flexible

Return Value

A newly created RBLayoutFlexiPositionerMetricSchema.

Declared In

RBLayoutFlexiPositionerMetricSchema.h

+ flexibleWithAbsoluteMinimum:maximum:

Convenience class method that returns a flexible mode metric using the provided minimum and maximum absolute values.

+ (nonnull instancetype)flexibleWithAbsoluteMinimum:(CGFloat)minimum maximum:(CGFloat)maximum

Parameters

minimum

The minimum absolute pt value, 0 ignores.

maximum

The maximum absolute pt value, 0 ignores.

Return Value

A newly created RBLayoutFlexiPositionerMetricSchema.

Declared In

RBLayoutFlexiPositionerMetricSchema.h

+ flexibleWithPercentageMinimum:maximum:

Convenience class method that returns a flexible mode metric using the provided minimum and maximum percentage values.

+ (nonnull instancetype)flexibleWithPercentageMinimum:(CGFloat)minimum maximum:(CGFloat)maximum

Parameters

minimum

The minimum percentage sizing value (0.0 - 1.0), 0 ignores.

maximum

The maximum percentage sizing value (0.0 - 1.0), 0 ignores.

Return Value

A newly created RBLayoutFlexiPositionerMetricSchema.

Declared In

RBLayoutFlexiPositionerMetricSchema.h

StringSerialisation Methods

– initWithString:

Initializes a new RBLayoutFlexiPositionerMetricSchema object from an NSString.

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

Parameters

string

A string representation of the metric schema.

Return Value

A newly initialized RBLayoutFlexiPositionerMetricSchema object.

Declared In

RBLayoutFlexiPositionerSchema+StringSerialisation.h