File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed
Cookbook/CookbookCommon/Sources/CookbookCommon Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -234,11 +234,28 @@ struct MasterView: View {
234234 }
235235 }
236236 . navigationBarTitle ( " AudioKit " )
237+ . navigationBarTitleDisplayMode ( . inline)
237238 . toolbar {
238- Button {
239- showingInfo = true
240- } label: {
241- Image ( systemName: " info.circle " )
239+ // This leading ToolbarItem is required to center the AudioKit logo on iPhones.
240+ ToolbarItem ( placement: . topBarLeading) {
241+ Rectangle ( )
242+ . frame ( minWidth: 30 )
243+ . hidden ( )
244+ . accessibilityHidden ( true )
245+ }
246+ ToolbarItem ( placement: . principal) {
247+ Image ( " audiokit-logo " )
248+ . resizable ( )
249+ . aspectRatio ( contentMode: . fit)
250+ . padding ( 10 )
251+ }
252+ ToolbarItem ( placement: . topBarTrailing) {
253+ Button {
254+ showingInfo. toggle ( )
255+ } label: {
256+ Image ( systemName: " info.circle " )
257+ }
258+ . accessibilityLabel ( " Learn about AudioKit " )
242259 }
243260 }
244261 . sheet ( isPresented: $showingInfo) {
You can’t perform that action at this time.
0 commit comments