TextStyle
Collection of all TextStyle Extensions.
Subspec: Extensions/TextStyleExtension
-
Return a TextStyle that’s identical to the called except the color set to the given UIColor.
Declaration
Swift
func withColor(_ color: UIColor) -> TextStyleParameters
colorThe color that’s applied to the TextStyle.
Return Value
TextStyle that has custom color being applied.
-
Return a TextStyle that’s identical to the called except the text allignment is set to the given allignment.
Declaration
Swift
func withAlignment(_ allignment: NSTextAlignment) -> TextStyleParameters
allignmentNSTextAlignment.
Return Value
Updated text style.
-
Return a TextStyle that’s identical to the called except the text line spacing is set to the given line spacing.
Declaration
Swift
func withLineSpacing(_ lineSpacing: CGFloat) -> TextStyleParameters
lineSpacingCGFloat.
Return Value
TextStyle.
-
Returns textstyle with its em font as default font.
Declaration
Swift
func withEmFont() -> TextStyleReturn Value
Textstyle with em font selected.
-
Returns textstyle with its strong font as default font.
Declaration
Swift
func withStrongFont() -> TextStyleReturn Value
Textstyle with strong font selected.
-
This attempts to build a regular font verson of this font by getting the family name.
Declaration
Swift
func withRegularFont() -> TextStyleReturn Value
The font you’ve built but with a regular typeface.
-
Returns new text style given a minimum line height.
Declaration
Swift
func withMinLineHeight(_ minimumLineHeight: CGFloat) -> TextStyleParameters
minimumLineHeightMinimum line height.
-
Returns new text style given value for character spacing.
Declaration
Swift
func withCharacterSpacing(_ spacing: CGFloat) -> TextStyleParameters
spacingcharacter spacing.
-
Returns new text style given a line break mode.
Declaration
Swift
func withLineBreakMode(_ lineBreakMode: LineBreakMode) -> TextStyleParameters
lineBreakModeLine break mode.
Return Value
TextStyle.
TextStyle Extension Reference