EFStyleBubbleParams
public class EFStyleBubbleParams : EFStyleParams
Parameters for bubble-style QR code styling.
This class defines the styling parameters for bubble-style QR codes, which feature rounded, bubble-like data modules with a distinctive appearance. The bubble style creates QR codes with a modern, friendly appearance that stands out from traditional square-based QR codes.
## Features
- Bubble-shaped data modules
- Customizable data colors
- Position detection pattern styling
- Icon and backdrop support
- Modern, friendly appearance
## Usage
let params = EFStyleBubbleParams(
icon: icon,
backdrop: backdrop,
dataColor: .blue,
dataCenterColor: .white,
position: position
)
let style = EFQRCodeStyle.bubble(params)
## Visual Characteristics
- Data modules appear as rounded bubbles
- Position detection patterns can be styled independently
- Supports custom colors for different elements
- Creates a modern, approachable appearance
-
The default backdrop configuration for bubble QR codes.
Declaration
Swift
public static let defaultBackdrop: EFStyleParamBackdrop
-
The default color for bubble data modules (light blue).
Declaration
Swift
public static let defaultDataColor: CGColor
-
The default color for the center of bubble data modules (white).
Declaration
Swift
public static let defaultDataCenterColor: CGColor
-
The default position detection pattern configuration.
Declaration
Swift
public static let defaultPosition: EFStyleBubbleParamsPosition
-
Creates bubble QR code styling parameters.
Declaration
Swift
public init( icon: EFStyleParamIcon? = nil, backdrop: EFStyleParamBackdrop = EFStyleBubbleParams.defaultBackdrop, dataColor: CGColor = EFStyleBubbleParams.defaultDataColor, dataCenterColor: CGColor = EFStyleBubbleParams.defaultDataCenterColor, position: EFStyleBubbleParamsPosition = EFStyleBubbleParams.defaultPosition )
Parameters
icon
The icon to display in the center of the QR code. Defaults to nil.
backdrop
The backdrop configuration. Defaults to default backdrop.
dataColor
The color of the bubble data modules. Defaults to light blue.
dataCenterColor
The color of the center of bubble data modules. Defaults to white.
position
The position detection pattern configuration. Defaults to default position.