iOS Demo: host the builder directly, filled (fix portrait centering)

ShoeGazeBuilderiOSApp wrapped the builder in a NavigationStack with its own
title, duplicating the builder's header and leaving the content vertically
centered in portrait. Host ShoeGazeBuilderView directly with a fill frame and no
NavigationStack/title — the builder provides its own chrome and scroll regions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-04 19:44:02 -07:00
parent 19feb03fe8
commit 36202a5e95
@@ -13,8 +13,9 @@ import LyrebirdShoeGazeUI
/// lifetime of the app. The audio engine is **not** started automatically — the user presses /// lifetime of the app. The audio engine is **not** started automatically — the user presses
/// Start in ``ShoeGazeBuilderView``. The engine is stopped when the view disappears. /// Start in ``ShoeGazeBuilderView``. The engine is stopped when the view disappears.
/// ///
/// ``ShoeGazeBuilderView`` manages its own scroll regions (palette + builder), so it is hosted /// ``ShoeGazeBuilderView`` draws its own header/title and manages its own scroll regions (palette
/// directly rather than wrapped in an outer `ScrollView`. /// + board canvas), so it is hosted directly — no `NavigationStack`, title, or outer `ScrollView`.
/// A fill frame keeps it pinned to the full window so portrait isn't vertically centered.
@main @main
struct ShoeGazeBuilderiOSApp: App { struct ShoeGazeBuilderiOSApp: App {
@@ -23,7 +24,6 @@ struct ShoeGazeBuilderiOSApp: App {
var body: some Scene { var body: some Scene {
WindowGroup { WindowGroup {
NavigationStack {
ShoeGazeBuilderView( ShoeGazeBuilderView(
shoeGaze: model.shoeGaze, shoeGaze: model.shoeGaze,
library: model.library, library: model.library,
@@ -31,10 +31,8 @@ struct ShoeGazeBuilderiOSApp: App {
onEnableLiveInput: { model.enableLiveInput() }, onEnableLiveInput: { model.enableLiveInput() },
midi: model.midi midi: model.midi
) )
.navigationTitle("ShoeGaze Builder") .frame(maxWidth: .infinity, maxHeight: .infinity)
.navigationBarTitleDisplayMode(.inline)
.task { await model.startLibrary() } .task { await model.startLibrary() }
}
.onDisappear { model.stop() } .onDisappear { model.stop() }
.onOpenURL { url in model.importDocument(at: url) } .onOpenURL { url in model.importDocument(at: url) }
} }