HelpModel

final class HelpModel : ObservableObject

The model for HelpView

  • The shared instance of this HelpModel class

    Declaration

    Swift

    static let shared: HelpModel
  • The page to show

    Declaration

    Swift

    @Published
    var page: Page? { get set }
  • The content of the page

    Declaration

    Swift

    @Published
    var text: String { get set }
  • Private init

    Declaration

    Swift

    private init()
  • The pages for the Help View

    Note

    They are taken from the Documentation Catalog
    See more

    Declaration

    Swift

    enum Page : String, CaseIterable
  • Get the content of a help page

    Declaration

    Swift

    static func getPage(help: HelpModel.Page) -> String

    Parameters

    help

    The page

    Return Value

    The content of the page

  • Convert a ‘docc’ link to a SwiftUI View with a button

    Declaration

    Swift

    @ViewBuilder
    func doccLink(text: String) -> some View

    Parameters

    text

    The text containing the link

    Return Value

    A SwiftUI View