Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Sources/FlexUI/Classes/Extensions/FlexUI+UILabel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,25 @@ public extension FlexUI where Component: UILabel {
component.textAlignment = textAlignment
return self
}

/// A Boolean value that determines whether the label reduces the text’s font size to fit the
/// title string into the label’s bounding rectangle.
///
/// - Returns: The current instance of `FlexUI` for further configuration.
@discardableResult
@MainActor
func adjustsFontSizeToFitWidth(_ adjustsFontSizeToFitWidth: Bool) -> Self {
component.adjustsFontSizeToFitWidth = adjustsFontSizeToFitWidth
return self
}

/// The minimum scale factor for the label’s text.
///
/// - Returns: The current instance of `FlexUI` for further configuration.
@discardableResult
@MainActor
func minimumScaleFactor(_ minimumScaleFactor: CGFloat) -> Self {
component.minimumScaleFactor = minimumScaleFactor
return self
}
}