Skip to content

Commit

Permalink
Merge pull request #161 from markjeschke/markj/add-audiokit-logo-to-n…
Browse files Browse the repository at this point in the history
…av-title

Added AudioKit logo to the navigation title
  • Loading branch information
NickCulbertson committed Jul 4, 2024
2 parents c8d513f + 5276c03 commit 0f66553
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions Cookbook/CookbookCommon/Sources/CookbookCommon/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,28 @@ struct MasterView: View {
}
}
.navigationBarTitle("AudioKit")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
Button {
showingInfo = true
} label: {
Image(systemName: "info.circle")
// This leading ToolbarItem is required to center the AudioKit logo on iPhones.
ToolbarItem(placement: .topBarLeading) {
Rectangle()
.frame(minWidth: 30)
.hidden()
.accessibilityHidden(true)
}
ToolbarItem(placement: .principal) {
Image("audiokit-logo")
.resizable()
.aspectRatio(contentMode: .fit)
.padding(10)
}
ToolbarItem(placement: .topBarTrailing) {
Button {
showingInfo.toggle()
} label: {
Image(systemName: "info.circle")
}
.accessibilityLabel("Learn about AudioKit")
}
}
.sheet(isPresented: $showingInfo) {
Expand Down

0 comments on commit 0f66553

Please sign in to comment.