SwiftUI

  • A Layout that arranges its subviews in columns

    See more

    Declaration

    Swift

    public struct ColumnsLayout: Layout
  • SwiftUI View when creating a new document

    See more

    Declaration

    Swift

    struct TemplateView: View
  • SwiftUI View for the content

    See more

    Declaration

    Swift

    struct ContentView: View
  • SwiftUI View for the main content

    See more

    Declaration

    Swift

    struct MainView: View
  • SwiftUI View for the toolbar

    See more

    Declaration

    Swift

    struct ToolbarView: View
  • SwiftUI View for the header

    See more

    Declaration

    Swift

    struct HeaderView: View
  • SwiftUI View for the song

    See more

    Declaration

    Swift

    struct SongView: View
  • SwiftUI View for the chord diagrams

    See more

    Declaration

    Swift

    struct ChordsView: View
  • SwiftUI View for a chord diagram

    See more

    Declaration

    Swift

    struct ChordDiagramView: View
  • SwiftUI View for the audio player

    See more

    Declaration

    Swift

    struct AudioPlayerView: View
  • SwiftUI View for the metronome

    See more

    Declaration

    Swift

    struct MetronomeView: View
  • SwiftUI View for the ChordProEditor

    See more

    Declaration

    Swift

    struct EditorView: View
  • SwiftUI View for the file browser

    See more

    Declaration

    Swift

    struct FileBrowserView: View
  • SwiftUI View for selecting the songs folder

    See more

    Declaration

    Swift

    struct SongFolderView: View
  • SwiftUI View for a Song export

    See more

    Declaration

    Swift

    struct ExportSongView: View
  • SwiftUI View for a folder export

    See more

    Declaration

    Swift

    struct ExportFolderView: View
  • SwiftUI Viewto select a file

    Note

    A file can be a normal file but also a folder
    See more

    Declaration

    Swift

    struct FileButtonView: View
  • Menu Items and Keyboard shortcuts for font size

    Note

    Unfortunately, this cannot be placed in a Menu because it does not proper update its state…
    See more

    Declaration

    Swift

    struct MenuButtonsView: View
  • SwiftUI View for the settings

    See more

    Declaration

    Swift

    struct SettingsView: View
  • SwiftUI View for the Print Button

    See more

    Declaration

    Swift

    struct PrintSongView: View
  • A SwiftUI View for a ChordDefinition

    The View can be styled with the passed DisplayOptions and further with the usual SwiftUI modifiers.

    The color of the diagram are styled with the .foregroundStyle modifier

    • The color of the diagram is the primary color.
    • The labels are the secondary color

    Note

    If you don’t attach a .foregroundStyle modifier, the labels are hard to see because the primary and secondary color are not that different.

    The height of the View is just as needed

    It will calculate all the bits and pieces based on the width and will be not a fixed height. As always, you can set the height with a modifier as it pleases you.

    Best is to wrap the View in another View to attach any modifiers:

    /// SwiftUI `View` for a chord diagram
    struct ChordDiagramView: View {
    /// The chord
    let chord: ChordDefinition
    /// Width of the chord diagram
    var width: Double
    /// Display options
    var options: ChordDefinition.DisplayOptions
    /// The current color scheme
    @Environment(\.colorScheme) var colorScheme
    /// The body of the `View`
    var body: some View {
       ChordDefinitionView(chord: chord, width: width, options: options)
           .foregroundStyle(.primary, colorScheme == .dark ? .black : .white)
       }
    }
    

    If you want to render the chord for print; just set the style to ‘black and white’ and use ImageRenderer to get your image.

    See more

    Declaration

    Swift

    public struct ChordDefinitionView: View
  • A SwiftUI View to create a ChordDefinition with pickers

    See more

    Declaration

    Swift

    public struct CreateChordView: View