crossmate

A collaborative crossword app for iOS
Log | Files | Refs | LICENSE

commit 74e0a4cd83f6c5912929568cde80929f780f58d6
parent e9389d3f6d00689c7cf71421a6968635323e2e37
Author: Michael Camilleri <[email protected]>
Date:   Fri, 18 Sep 2026 10:23:25 +0900

Keep the puzzle keyboard above the home indicator

On an iPhone running iOS 27, the Clue Bar's custom keyboard could be
laid out through the bottom safe area. Its fixed-height panel therefore
dropped the last row below reachable screen space.

This commit reserves the phone controls with a bottom safe-area inset,
so the Clue Bar and keyboard remain together while every key stays
reachable. iPad controls retain their existing edge-to-edge layout.

Co-Authored-By: Codex GPT 5.6 Terra <[email protected]>

Diffstat:
MCrossmate/Views/Puzzle/PuzzleView.swift | 24++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/Crossmate/Views/Puzzle/PuzzleView.swift b/Crossmate/Views/Puzzle/PuzzleView.swift @@ -304,10 +304,14 @@ struct PuzzleView: View { } private var phoneLayout: some View { - VStack(spacing: 0) { - puzzleArea() - controlsArea(showClueBar: true) - } + puzzleArea() + // The custom keyboard must sit above the home-indicator area. A + // bottom safe-area inset both reserves its actual height from the + // grid and keeps every key reachable on iOS 27, whose bottom inset + // otherwise makes the fixed-height panel extend off-screen. + .safeAreaInset(edge: .bottom, spacing: 0) { + controlsArea(showClueBar: true) + } } private var landscapePadLayout: some View { @@ -339,6 +343,7 @@ struct PuzzleView: View { .frame(maxWidth: .infinity, maxHeight: .infinity) controlsArea(showClueBar: false) + .ignoresSafeArea(edges: .bottom) } } @@ -373,6 +378,7 @@ struct PuzzleView: View { .frame(maxWidth: .infinity, maxHeight: .infinity) controlsArea(showClueBar: false) + .ignoresSafeArea(edges: .bottom) } } @@ -552,7 +558,6 @@ struct PuzzleView: View { } } .animation(.easeOut(duration: 0.25), value: isSolved) - .ignoresSafeArea(edges: .bottom) } private var controlsPanelHeight: CGFloat { @@ -768,12 +773,7 @@ private struct ControlsView<Content: View>: View { @ViewBuilder var content: () -> Content var body: some View { - VStack(spacing: 0) { - content() - .frame(height: height) - Color(.systemGroupedBackground) - } - .background(Color(.systemGroupedBackground)) - .ignoresSafeArea(edges: .bottom) + content() + .frame(height: height) } }