SwiftUI
-
A
See moreLayout
that arranges itssubviews
in columnsDeclaration
Swift
public struct ColumnsLayout: Layout
-
SwiftUI
See moreView
when creating a new documentDeclaration
Swift
struct TemplateView: View
-
SwiftUI
See moreView
for the contentDeclaration
Swift
struct ContentView: View
-
SwiftUI
See moreView
for the main contentDeclaration
Swift
struct MainView: View
-
SwiftUI
See moreView
for the toolbarDeclaration
Swift
struct ToolbarView: View
-
SwiftUI
See moreView
for the headerDeclaration
Swift
struct HeaderView: View
-
SwiftUI
See moreView
for the songDeclaration
Swift
struct SongView: View
-
SwiftUI
See moreView
for the chord diagramsDeclaration
Swift
struct ChordsView: View
-
SwiftUI
See moreView
for a chord diagramDeclaration
Swift
struct ChordDiagramView: View
-
SwiftUI
See moreView
for the audio playerDeclaration
Swift
struct AudioPlayerView: View
-
SwiftUI
See moreView
for the metronomeDeclaration
Swift
struct MetronomeView: View
-
SwiftUI
See moreView
for theChordProEditor
Declaration
Swift
struct EditorView: View
-
SwiftUI
See moreView
for the file browserDeclaration
Swift
struct FileBrowserView: View
-
SwiftUI
See moreView
for selecting the songs folderDeclaration
Swift
struct SongFolderView: View
-
Declaration
Swift
struct ExportSongView: View
-
SwiftUI
See moreView
for a folder exportDeclaration
Swift
struct ExportFolderView: View
-
Declaration
Swift
struct FileButtonView: View
-
Menu Items and Keyboard shortcuts for font size
Note
Unfortunately, this cannot be placed in aMenu
because it does not proper update its state…Declaration
Swift
struct MenuButtonsView: View
-
SwiftUI
See moreView
for the settingsDeclaration
Swift
struct SettingsView: View
-
SwiftUI
See moreView
for the Print ButtonDeclaration
Swift
struct PrintSongView: View
-
A SwiftUI
View
for aChordDefinition
The
View
can be styled with the passedDisplayOptions
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 neededIt 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 anotherView
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
See moreImageRenderer
to get your image.Declaration
Swift
public struct ChordDefinitionView: View
-
A SwiftUI
See moreView
to create aChordDefinition
with pickersDeclaration
Swift
public struct CreateChordView: View