[iOS] Decouple top app nav bar visibility from annotation toolbar visibility#356
[iOS] Decouple top app nav bar visibility from annotation toolbar visibility#356eslamwael74 wants to merge 5 commits into
Conversation
…ibility * Allow hiding the iOS top app navigation bar without hiding annotation toolbars * Update changelog * Updating pubspec.yaml * Updating package version
There was a problem hiding this comment.
Pull request overview
This PR updates the iOS viewer controller logic so hideTopAppNavBar can hide only the app navigation bar while keeping annotation toolbars visible, and publishes the change as 1.0.1-57 with a changelog entry.
Changes:
- Decouple top annotation toolbar enablement from
topAppNavBarHidden(iOS). - Adjust iOS viewer settings to preserve translucency behavior when top UI is hidden.
- Bump package version and add a
1.0.1-57changelog entry.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| pubspec.yaml | Bumps package version to 1.0.1-57. |
| ios/Classes/PTFlutterDocumentController.m | Updates iOS toolbar/nav-bar visibility logic to decouple app nav bar hiding from annotation toolbar hiding. |
| CHANGELOG.md | Adds release notes for 1.0.1-57. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* Update navigation bar visibility to account for top toolbars state * Hide navigation bar when top toolbars are hidden
| if ([self isTopToolbarEnabled]) { | ||
| if (![self isNavigationBarEnabled]) { | ||
| return NO; | ||
| } | ||
| return [self.navigationController isNavigationBarHidden]; |
There was a problem hiding this comment.
@copilot This is intentional for this PR. When hideTopAppNavBar is enabled, the native navigation bar is hidden, but the annotation/top toolbar should remain visible. Returning [super controlsHidden] here causes both bars to be hidden, which breaks the decoupling this PR is adding. So return NO is required to keep toolbar visibility independent from the app nav bar.
* Prevent showing the navigation bar when top toolbars are hidden.
Summary
hideTopAppNavBaron iOS to hide only the top app navigation bar.hideTopAppNavBaris enabled.1.0.1-57.Why
Previously,
hideTopAppNavBaralso disabled the top annotation toolbar becauseisTopToolbarEnableddepended on bothtopAppNavBarHiddenandtopToolbarsHidden.This made it impossible to hide the iOS top app navigation bar while still showing annotation tools.
Changes
topToolbarsHidden.topAppNavBarHidden.