From 6129153ebd74b2982aa15526e250ffb5a04ffb64 Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Sat, 15 Aug 2026 18:05:48 +0200 Subject: [PATCH 1/2] Put the document tool bar back under the status bar The bar was sized to safe area top + 44 and pinned to the top of the view, a 2019 trick for reaching under the notch: it worked as long as UIToolbar laid its items out along the bottom of an over-tall frame. iOS 26 puts them along the top instead, so the buttons landed on the status bar - clipped by the top of the screen - and the rest of the bar was an empty band between them and whatever came next, the banner in the free edition and the document itself in the paid one. The bar is its own height now, pinned to the safe area, which is where every version of iOS puts a bar's content anyway. The measuring-stick view behind the trick goes with it, and the root view takes systemBackground rather than white, since the strip behind the status bar is now its background and not the bar's. From iOS 26 the buttons are glass capsules that fill the bar's whole height, so what is pinned to its bottom edge meets them with nothing in between and cuts them off; they get 8 points of room there, and nothing before iOS 26, where the bar has a background of its own and the same margin would only show as a band of nothing. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Q1T4UTUxDqjCGUn3Uiyhkj --- CHANGELOG.md | 10 +++++++++- .../DocumentViewController.swift | 14 +++++++++++++- OpenDocumentReader/Main.storyboard | 19 ++++--------------- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86d4ba8..887d3b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,13 @@ open: **a second build under the same version goes under the already cut heading, not back under `Unreleased`.** Date the heading and add its compare link once the version tag exists. +## [Unreleased] + +### Fixed + +- The buttons above an open document no longer sit on the status bar, and the + empty band below them is gone. + ## [1.39] ### Changed @@ -147,7 +154,8 @@ submitted. - An incorrect password is now reported as such instead of a generic failure. - Page handling and decryption fixes when opening protected documents. -[Unreleased]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.38...HEAD +[Unreleased]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.39...HEAD +[1.39]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.38...v1.39 [1.38]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.37...v1.38 [1.37]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.36...v1.37 [1.36]: https://github.com/opendocument-app/OpenDocument.ios/compare/v1.35...v1.36 diff --git a/OpenDocumentReader/DocumentViewController.swift b/OpenDocumentReader/DocumentViewController.swift index a0cdcec..58c5344 100644 --- a/OpenDocumentReader/DocumentViewController.swift +++ b/OpenDocumentReader/DocumentViewController.swift @@ -189,6 +189,17 @@ class DocumentViewController: UIViewController, DocumentDelegate, UISearchBarDel } } + /// From iOS 26 the bar's buttons are glass capsules filling its whole + /// height, which whatever is pinned to its bottom edge would cut off. Older + /// bars have a background of their own and want no such gap. + private static var toolBarBottomMargin: CGFloat { + if #available(iOS 26.0, *) { + return 8 + } + + return 0 + } + func setVCconstraints() { searchBar.translatesAutoresizingMaskIntoConstraints = false bannerSlot.translatesAutoresizingMaskIntoConstraints = false @@ -197,7 +208,8 @@ class DocumentViewController: UIViewController, DocumentDelegate, UISearchBarDel searchBar.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true searchBar.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true - searchBar.topAnchor.constraint(equalTo: toolBar.bottomAnchor).isActive = true + searchBar.topAnchor.constraint(equalTo: toolBar.bottomAnchor, constant: Self.toolBarBottomMargin).isActive = + true bannerSlot.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true bannerSlot.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true diff --git a/OpenDocumentReader/Main.storyboard b/OpenDocumentReader/Main.storyboard index 1607177..ca20e82 100644 --- a/OpenDocumentReader/Main.storyboard +++ b/OpenDocumentReader/Main.storyboard @@ -32,18 +32,11 @@ - - + - + @@ -96,14 +89,10 @@ - + - - - - - + From f30acc59740ed593a8008d800c7a6d413f519a58 Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Sat, 15 Aug 2026 18:43:00 +0200 Subject: [PATCH 2/2] Take the page tab bar out of the tool bar's stack It was an arranged subview of the stack the tool bar sits in, and at the same time pinned to the banner's bottom edge in code - two answers to where it goes, which Auto Layout settles by breaking one of them. The answers agreed while everything between the two was zero high, so the contradiction never showed; the margin under the tool bar pulls them 8 points apart on iOS 26, and a document with more than one page is what puts the tab bar on screen to see it. The code's answer is the one that is used, so the tab bar becomes a plain subview and the stack is left with what it lays out: the tool bar and the progress bar. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Q1T4UTUxDqjCGUn3Uiyhkj --- OpenDocumentReader/DocumentViewController.swift | 3 +++ OpenDocumentReader/Main.storyboard | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/OpenDocumentReader/DocumentViewController.swift b/OpenDocumentReader/DocumentViewController.swift index 58c5344..84d8e99 100644 --- a/OpenDocumentReader/DocumentViewController.swift +++ b/OpenDocumentReader/DocumentViewController.swift @@ -217,6 +217,9 @@ class DocumentViewController: UIViewController, DocumentDelegate, UISearchBarDel // no height here: that is bannerSlotHeight from the storyboard, which // hideBannerSlot zeroes, and a second one would fight it + // below the banner, which is why the tab bar is not in the tool bar's + // stack: an arranged subview is placed by the stack, and these would be + // a second answer to the same question pageTabBar.topAnchor.constraint(equalTo: bannerSlot.bottomAnchor).isActive = true pageTabBar.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true pageTabBar.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true diff --git a/OpenDocumentReader/Main.storyboard b/OpenDocumentReader/Main.storyboard index ca20e82..35be366 100644 --- a/OpenDocumentReader/Main.storyboard +++ b/OpenDocumentReader/Main.storyboard @@ -58,10 +58,6 @@ - @@ -87,6 +83,10 @@ +