GuidesAPI ReferenceRelease Notes
HomeLog InHome
Guides

BlazeMomentsPlayerCtaStyle - iOS

The BlazeMomentsPlayerCtaStyle struct represents the style configuration for the Call to Action (CTA) button in a moment.

Properties

cornerRadius

var cornerRadius: CGFloat

The corner radius of the CTA button.

borderColor

var borderColor: UIColor

The SDK fallback border color of the CTA button, used when the backend/CMS provides no valid borderColor. Backend/CMS value takes priority when present and parseable. Defaults to .clear.

borderWidth

var borderWidth: CGFloat

The SDK fallback border width of the CTA button in points, used when the backend/CMS provides no borderWidth. Backend/CMS value takes priority when present. Defaults to 0.

width

var width: CGFloat?

The width of the CTA button.

height

var height: CGFloat

The height of the CTA button.

font

var font: UIFont

The font of the CTA button

layoutPositioning

var layoutPositioning: CTAPositioning

The layout positioning style of the CTA.

icon

var icon: UIImage?

The optional icon image displayed on the CTA button. If provided, this icon is used to enhance the visual appearance or convey additional meaning to the CTA button. It's typically displayed alongside the button text or in place of text for icon-only buttons.

horizontalAlignment

var horizontalAlignment: CTAHorizontalAlignment

The horizontal alignment of the CTA button.

isVisible

var isVisible: Bool

Whether the CTA should be visible.
When false, the CTA will be hidden even if it should be shown according to the content.
Only applies to non-ad playables.

CTAPositioning

Defines the layout positioning options for the CTA button.

ValueDescription
ctaNextToBottomButtonsBoxPosition the CTA button next to bottom buttons box, typically on the same horizontal line.
ctaBellowBottomButtonsBoxPosition the CTA button below the bottom buttons box, aligning it vertically beneath them.

CTAHorizontalAlignment

Defines the horizontal alignment options for the CTA button within its container.

ValueDescription
leadingAlign the CTA button to the leading edge of its container.
centerCenter the CTA button horizontally within its container.
trailingAlign the CTA button to the trailing edge of its container.
fullAvailableWidthAdjust the CTA button to match the maximum width of its container.
This will make the button stretch to occupy the full available width, respecting the container's padding or margin as defined by layout constraints.

Did this page help you?