Structure
Sticker
public struct Sticker: Wrapped
A struct
holding reference to a story sticker.
Relationships
Conforms To
Wrapped
Initializers
init(wrapper:)
public init(wrapper: @escaping () -> Wrapper)
Init.
Parameters
Name | Type | Description |
---|---|---|
wrapper | @escaping () -> Wrapper |
A valid |
init(identifier:wrapper:)
public init(identifier: String, wrapper: Wrapper)
Init.
Parameters
Name | Type | Description |
---|---|---|
identifier | String |
A valid |
wrapper | Wrapper |
A valid |
Properties
Methods
mention(_:)
static func mention(_ identfier: String) -> Sticker
Create a mension sticker for a given user.
Parameters
Name | Type | Description |
---|---|---|
identifier | A valid user identifier. |
Returns
A valid Sticker
.
tag(_:)
static func tag(_ tag: String) -> Sticker
Create an hashtag sticker.
Parameters
Name | Type | Description |
---|---|---|
tag | String |
A valid tag. |
Returns
A valid Sticker
.
location(_:)
static func location(_ identifier: String) -> Sticker
Create a location sticker.
Parameters
Name | Type | Description |
---|---|---|
identifier | String |
A valid location identfiier. |
Returns
A valid Sticker
.
slider(_:emoji:)
static func slider(_ question: String, emoji: String) -> Sticker
Create a slider sticker.
Parameters
Name | Type | Description |
---|---|---|
question | String |
A valid |
emoji | String |
A valid |
Returns
A valid Sticker
.
countdown(to:event:canBeFollowed:)
static func countdown(to date: Date, event: String, canBeFollowed: Bool = true) -> Sticker
Create a countdown sticker.
Parameters
Name | Type | Description |
---|---|---|
date | Date |
A valid |
event | String |
A valid |
canBeFollowed | Bool |
A valid |
Returns
A valid Sticker
.
question(_:)
static func question(_ question: String) -> Sticker
Create a question sticker.
Parameters
Name | Type | Description |
---|---|---|
question | String |
A valid |
Returns
A valid Sticker
.
poll(_:tallies:fontSize:)
static func poll<S: Sequence>(_ question: String,
tallies: S,
fontSize: CGFloat = 28) -> Sticker where S.Element == String
Create a poll sticker.
Parameters
Name | Type | Description |
---|---|---|
question | String |
A valid |
tallies | S |
A sequence of |
fontSize | CGFloat |
A |
Returns
A valid Sticker
.
zIndex(_:)
func zIndex(_ index: Int) -> Sticker
Set a new zIndex
to self
.
Parameters
Name | Type | Description |
---|---|---|
index | Int |
A valid |
Returns
A valid Sticker
.
position(_:)
func position(_ position: CGPoint) -> Sticker
Set a relative position for self
.
Parameters
Name | Type | Description |
---|---|---|
position | CGPoint |
A valid |
Returns
A valid Sticker
.
position(x:y:)
func position(x: CGFloat? = nil, y: CGFloat? = nil) -> Sticker
Set a relative position for self
.
Parameters
Name | Type | Description |
---|---|---|
x | CGFloat? |
An optional |
y | CGFloat? |
An optional |
Returns
A valid Sticker
.
rotate(by:)
func rotate(by angle: CGFloat) -> Sticker
Rotate self
by angle
in degrees.
Parameters
Name | Type | Description |
---|---|---|
angle | CGFloat |
A valid |
Returns
A valid Sticker
.
scale(by:)
func scale(by factor: CGFloat) -> Sticker
Scale self
by factor
.
Parameters
Name | Type | Description |
---|---|---|
factor | CGFloat |
A valid |
Returns
A valid Sticker
.
size(width:height:)
func size(width: CGFloat? = nil, height: CGFloat? = nil) -> Sticker
Set relative size.
Parameters
Name | Type | Description |
---|---|---|
width | CGFloat? |
An optional |
height | CGFloat? |
An optional |
Returns
A valid Sticker
.