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..84d8e99 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 @@ -205,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 1607177..35be366 100644 --- a/OpenDocumentReader/Main.storyboard +++ b/OpenDocumentReader/Main.storyboard @@ -32,18 +32,11 @@ - - + - + @@ -65,10 +58,6 @@ - @@ -94,16 +83,16 @@ + - + - - - - - +