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: BlazeObjectXPositionThe horizontal position of the object. See BlazeObjectXPosition below.
yPosition
var yPosition: BlazeObjectYPositionThe 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
| Value | Default offset (CGFloat) | Description |
|---|---|---|
| leadingToLeading | 0 | Aligns the leading edge of the object to the leading edge of the second element with an optional offset. |
| leadingToTrailing | 0 | Aligns the leading edge of the object to the trailing edge of the second element with an optional offset. |
| trailingToLeading | 0 | Aligns the trailing edge of the object to the leading edge of the second element with an optional offset. |
| trailingToTrailing | 0 | Aligns the trailing edge of the object to the trailing edge of the second element with an optional offset. |
| centerX | 0 | Aligns the center of the object with the center of the second element along the x-axis with an optional offset. |
| centerToLeading | 0 | Aligns the center of the object to the leading edge of the second element with an optional offset. |
| centerToTrailing | 0 | Aligns 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
| Value | Default offset (CGFloat) | Description |
|---|---|---|
| bottomToTop | 0 | Aligns the bottom edge of the object to the top edge of the second element with an optional offset. |
| topToTop | 0 | Aligns the top edge of the object to the top edge of the second element with an optional offset. |
| bottomToBottom | 0 | Aligns the bottom edge of the object to the bottom edge of the second element with an optional offset. |
| topToBottom | 0 | Aligns the top edge of the object to the bottom edge of the second element with an optional offset. |
| centerToTop | 0 | Aligns the center of the object to the top edge of the second element with an optional offset. |
| centerY | 0 | Aligns the center of the object with the center of the second element along the y-axis with an optional offset. |
| centerToBottom | 0 | Aligns the center of the object to the bottom edge of the second element with an optional offset. |
Updated 11 days ago
Did this page help you?
