BlazeMomentsPlayerCtaStyle - iOS
The BlazeMomentsPlayerCtaStyle struct represents the style configuration for the Call to Action (CTA) button in a moment.
Properties
cornerRadius
var cornerRadius: CGFloatThe corner radius of the CTA button.
borderColor
var borderColor: UIColorThe 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: CGFloatThe 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: CGFloatThe height of the CTA button.
font
var font: UIFontThe font of the CTA button
layoutPositioning
var layoutPositioning: CTAPositioningThe 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: CTAHorizontalAlignmentThe horizontal alignment of the CTA button.
isVisible
var isVisible: BoolWhether 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.
| Value | Description |
|---|---|
ctaNextToBottomButtonsBox | Position the CTA button next to bottom buttons box, typically on the same horizontal line. |
ctaBellowBottomButtonsBox | Position 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.
| Value | Description |
|---|---|
leading | Align the CTA button to the leading edge of its container. |
center | Center the CTA button horizontally within its container. |
trailing | Align the CTA button to the trailing edge of its container. |
fullAvailableWidth | Adjust 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. |
Updated 11 days ago
