GuidesAPI ReferenceRelease Notes
HomeLog InHome
Guides

BlazeWidgetLayout - iOS

The BlazeWidgetLayout struct is a part of the BlazeSDK and is responsible for defining the layout properties and style of the widget items in a BlazeWidgetView.

Properties

horizontalItemsSpacing

var horizontalItemsSpacing: CGFloat

Sets the horizontal spacing between items in the widget

verticalItemsSpacing

var verticalItemsSpacing: CGFloat

Sets the vertical spacing between items

Applies to Grid Widget only

itemRatio

var itemRatio: CGFloat

A CGFloat representing the aspect ratio of the widget items. In row widgets, the height is fixed by the container, and the width is calculated based on the ratio. In grid widgets, the width is fixed by the container, and the height is dynamically calculated.

margins

var margins: NSDirectionalEdgeInsets

An NSDirectionalEdgeInsets representing the space between the container and the items.

columns

var columns: Int

An Int representing the number of columns in a grid layout.

Applies only for Grid Widget

maxDisplayItemsCount

var maxDisplayItemsCount: Int?

An optional Int representing the maximum number of items allowed to be presented in the widget. nil value allows for an infinite number of items.

widgetItemStyle

var widgetItemStyle: BlazeWidgetItemStyle

A BlazeWidgetItemStyle object that defines the style settings for the widget items.

Usage

To create an instance of BlazeWidgetLayout, you can use the presets as your starting point on modify as needed.


Did this page help you?