Skip to content

Legacy Color Theming support #383

@heyltsjay

Description

@heyltsjay

For Apps supporting < iOS 13, it would be nice to expose a .colorProvider: (UITraitCollection) -> UIColor

example callsite:

let label: UILabel = {
     let label = UILabel()
     label.bonMotStyle = .init([
            .alignment(.center),
            .colorProvider({
                   // Ideally one would abstract this semantically
                   switch $0 {
                          case .light: return .darkText
                          case .dark: return .lightText
                   }
            )
     ])
    return label
}()

The implementation on the BonMot side would involve updating the current AdaptableTextContainer implementations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions