GuidesAPI ReferenceRelease Notes
HomeLog InHome
Guides

BlazeObjectPositioning - iOS

BlazeObjectPositioning defines the horizontal and vertical position of an object within a container. Use it to position UI elements such as titles and indicators inside a widget item.

Properties

xPosition

var xPosition: BlazeObjectXPosition

The horizontal position of the object. See BlazeObjectXPosition below.

yPosition

var yPosition: BlazeObjectYPosition

The vertical position of the object. See BlazeObjectYPosition below.

BlazeObjectXPosition

The BlazeObjectXPosition enum defines the horizontal position of an object relative to a sibling object's leading, trailing, or center axis. Each case takes an optional offset (CGFloat, default 0).

Cases

ValueDefault offset (CGFloat)Description
leadingToLeading0Aligns the leading edge of the object to the leading edge of the second element with an optional offset.
leadingToTrailing0Aligns the leading edge of the object to the trailing edge of the second element with an optional offset.
trailingToLeading0Aligns the trailing edge of the object to the leading edge of the second element with an optional offset.
trailingToTrailing0Aligns the trailing edge of the object to the trailing edge of the second element with an optional offset.
centerX0Aligns the center of the object with the center of the second element along the x-axis with an optional offset.
centerToLeading0Aligns the center of the object to the leading edge of the second element with an optional offset.
centerToTrailing0Aligns the center of the object to the trailing edge of the second element with an optional offset.

BlazeObjectYPosition

The BlazeObjectYPosition enum defines the vertical position of an object relative to a sibling object's top, bottom, or center axis. Each case takes an optional offset (CGFloat, default 0).

Cases

ValueDefault offset (CGFloat)Description
bottomToTop0Aligns the bottom edge of the object to the top edge of the second element with an optional offset.
topToTop0Aligns the top edge of the object to the top edge of the second element with an optional offset.
bottomToBottom0Aligns the bottom edge of the object to the bottom edge of the second element with an optional offset.
topToBottom0Aligns the top edge of the object to the bottom edge of the second element with an optional offset.
centerToTop0Aligns the center of the object to the top edge of the second element with an optional offset.
centerY0Aligns the center of the object with the center of the second element along the y-axis with an optional offset.
centerToBottom0Aligns the center of the object to the bottom edge of the second element with an optional offset.

Did this page help you?