File tree 1 file changed +21
-4
lines changed
Cookbook/CookbookCommon/Sources/CookbookCommon
1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -234,11 +234,28 @@ struct MasterView: View {
234
234
}
235
235
}
236
236
. navigationBarTitle ( " AudioKit " )
237
+ . navigationBarTitleDisplayMode ( . inline)
237
238
. 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 " )
242
259
}
243
260
}
244
261
. sheet ( isPresented: $showingInfo) {
You can’t perform that action at this time.
0 commit comments