FUISortCriterion

public struct FUISortCriterion : Equatable, Identifiable, CustomStringConvertible

Data model for FUIOrderPickerFormCell

Usage Example:

A typical sort criterion with default style:
FUISortCriterion(criterion: FUIMultiLineText("Name"),
                 isSelected: false,
                 isAscending: true,
                 ascendingText: FUIMultiLineText("Ascending"),
                 descendingText: FUIMultiLineText("Descending"))

A sort criterion with customized style:
FUISortCriterion(criterion: FUIMultiLineText("Priority", font: UIFont.preferredFioriFont(forTextStyle: .body), textColor: UIColor.red),
                 isSelected: true,
                 isAscending: false,
                 ascendingText: FUIMultiLineText("Lowest first", font: UIFont.preferredFioriFont(forTextStyle: .body), textColor: UIColor.purple),
                 descendingText: FUIMultiLineText("Highest first", font: UIFont.preferredFioriFont(forTextStyle: .headline), textColor: UIColor.blue))
  • The criterion text Default style: color: .primaryLabel, font-style: .body Can be customized with font, textColor and numberOfLines

    Declaration

    Swift

    public let criterion: FUIMultiLineText
  • A boolean value that determines the selected state of the criterion

    Declaration

    Swift

    public var isSelected: Bool
  • A boolean value that determines the order direction of the criterion

    Declaration

    Swift

    public var isAscending: Bool
  • The text displayed when the criterion is ascending, such as “Ascending” Default style: color: .tintColor, font-style: .body Can be customized with font, textColor and numberOfLines

    Declaration

    Swift

    public let ascendingText: FUIMultiLineText
  • The text displayed when the criterion is descending, such as “Descending” Default style: color: .tintColor, font-style: .body Can be customized with font, textColor and numberOfLines

    Declaration

    Swift

    public let descendingText: FUIMultiLineText
  • id

    Identify the criterion

    Declaration

    Swift

    public let id: UUID
  • Init

    Declaration

    Swift

    public init(criterion: FUIMultiLineText, isSelected: Bool, isAscending: Bool, ascendingText: FUIMultiLineText, descendingText: FUIMultiLineText)
  • Conforms Equatable

    Declaration

    Swift

    public static func == (lhs: FUISortCriterion, rhs: FUISortCriterion) -> Bool
  • Description

    Declaration

    Swift

    public var description: String { get }
  • Immediate change for a criterion

    See more

    Declaration

    Swift

    public enum Change : CustomStringConvertible