Structure¶
DefaultLabelStyle¶
The default label style in the current context.¶
Declaration¶
Overview¶
Use this label style to ensure all the views in the hierarchy use the default label style.
This is one of 3 default label styles. These are structs that conform to the LabelStyle protocol by implementing the makeBody(configuration:) function internally, so you don't have to do it yourself.
These are the default styles:
- DefaultLabelStyle (this style), which displays the Label as-is
- IconOnlyLabelStyle, which displays the icon only
- TitleOnlyLabelStyle, which displays the title only
All 3 styles have only one initializer, which takes no parameters.
To use a LabelStyle, pass it to a Label's labelStyle(_:) modifier:
Availability¶
iOS 14.0+
macOS 11.0+
tvOS 14.0+
watchOS 7.0+
Topics¶
Instance Method¶
makeBody(configuration:) Creates a view that represents the body of a label.
Initializer¶
init() Creates a default label style.
Type Alias¶
Body A view that represents the body of a label.