Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 1.0.1-57 - June 21, 2026
- Allow hiding the iOS top app navigation bar without hiding annotation toolbars.

# 1.0.1-56 - May 27, 2026
- Update Android to v11.13.0

Expand Down
11 changes: 7 additions & 4 deletions ios/Classes/PTFlutterDocumentController.m
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ - (void)didOpenDocument

- (BOOL)isTopToolbarEnabled
{
return (!self.topAppNavBarHidden && !self.topToolbarsHidden);
return !self.topToolbarsHidden;
}

- (BOOL)areTopToolbarsEnabled
Expand All @@ -157,6 +157,9 @@ - (BOOL)controlsHidden
{
if (self.navigationController) {
if ([self isTopToolbarEnabled]) {
if (![self isNavigationBarEnabled]) {
return NO;
}
return [self.navigationController isNavigationBarHidden];
Comment on lines 159 to 163

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

}
if ([self isBottomToolbarEnabled]) {
Expand Down Expand Up @@ -1031,10 +1034,10 @@ - (void)applyViewerSettings
}
self.toolManager.pencilTool = self.useStylusAsPen ? pencilTool : [PTPanTool class];

const BOOL hideNav = (self.topAppNavBarHidden || self.topToolbarsHidden);
const BOOL hideNav = self.topToolbarsHidden;
self.controlsHidden = hideNav;
Comment thread
eslamwael74 marked this conversation as resolved.
Outdated

const BOOL translucent = hideNav;
const BOOL translucent = (self.topAppNavBarHidden || self.topToolbarsHidden);
self.navigationController.navigationBar.translucent = translucent;
Comment thread
eslamwael74 marked this conversation as resolved.
Outdated
self.thumbnailSliderController.toolbar.translucent = translucent;

Expand Down Expand Up @@ -1917,7 +1920,7 @@ - (void)setLeadingNavButtonIcon:(NSString *)leadingNavButtonIcon
- (BOOL)shouldSetNavigationBarHidden:(BOOL)navigationBarHidden animated:(BOOL)animated
{
if (!navigationBarHidden) {
return [self isTopToolbarEnabled];
return [self isNavigationBarEnabled];
}
return YES;
Comment thread
eslamwael74 marked this conversation as resolved.
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: pdftron_flutter
description: A convenience wrapper to build Flutter apps that use the PDFTron mobile SDK for smooth, flexible, and stand-alone document viewing.
version: 1.0.1-56
version: 1.0.1-57
homepage: https://www.apryse.com
repository: https://github.com/ApryseSDK/pdftron-flutter
issue_tracker: https://github.com/ApryseSDK/pdftron-flutter/issues
Expand Down
Loading