Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the issue of Tab bar covering out color-palette-chooser while annotating a file, PSPDFKit Update #2994

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions Canvas.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/PSPDFKit/PSPDFKit-SP",
"state" : {
"revision" : "34567b2d180a86afb3925b1749f25ea9f40af586",
"version" : "13.9.1"
"revision" : "80539b4cf5f06bc987b1ceae49b42959f256896b",
"version" : "14.1.1"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -657,9 +657,7 @@ extension FileDetailsViewController: PDFViewControllerDelegate, FlexibleToolbarC

public func flexibleToolbarContainerContentRect(_ container: FlexibleToolbarContainer, for position: FlexibleToolbar.Position) -> CGRect {

let isCompact = container.traitCollection.horizontalSizeClass == .compact
let padding: CGFloat = isCompact ? 10 : 16

let padding: CGFloat = container.isHorizontallyCompact ? 10 : 16
let safeInsets = container.safeAreaInsets
let contentFrame = contentView.convert(contentView.bounds, to: container)
let toolbarRect = CGRect(
Expand All @@ -672,6 +670,16 @@ extension FileDetailsViewController: PDFViewControllerDelegate, FlexibleToolbarC
return toolbarRect
}

public func flexibleToolbarContainerWillShow(_ container: FlexibleToolbarContainer) {
guard container.isHorizontallyCompact else { return }
tabBarController?.tabBar.isHidden = true
}

public func flexibleToolbarContainerWillHide(_ container: FlexibleToolbarContainer) {
guard container.isHorizontallyCompact else { return }
tabBarController?.tabBar.isHidden = false
}

func saveAnnotations() {
for child in children {
if let pdf = child as? PDFViewController {
Expand Down Expand Up @@ -750,3 +758,9 @@ extension FileDetailsViewController: PDFViewControllerDelegate, FlexibleToolbarC
pdfAnnotationsMutatedMoveToDocsDirectory = true
}
}

private extension UIView {
var isHorizontallyCompact: Bool {
traitCollection.horizontalSizeClass == .compact
}
}
2 changes: 1 addition & 1 deletion Core/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ packages:
exactVersion: 3.5.0
PSPDFKit:
url: https://github.com/PSPDFKit/PSPDFKit-SP
exactVersion: 13.9.1
exactVersion: 14.1.1
Swifter:
url: https://github.com/httpswift/swifter
version: 1.5.0
Expand Down
2 changes: 1 addition & 1 deletion Parent/Parent.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,7 @@
repositoryURL = "https://github.com/PSPDFKit/PSPDFKit-SP";
requirement = {
kind = exactVersion;
version = 13.9.1;
version = 14.1.1;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
2 changes: 1 addition & 1 deletion Student/project-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ packages:
exactVersion: 9.1.0
PSPDFKit:
url: https://github.com/PSPDFKit/PSPDFKit-SP
exactVersion: 13.9.1
exactVersion: 14.1.1
FirebaseCrashlytics:
url: https://github.com/firebase/firebase-ios-sdk.git
exactVersion: 10.23.1
Expand Down
2 changes: 1 addition & 1 deletion Student/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ packages:
exactVersion: 9.1.0
PSPDFKit:
url: https://github.com/PSPDFKit/PSPDFKit-SP
exactVersion: 13.9.1
exactVersion: 14.1.1
FirebaseCrashlytics:
url: https://github.com/firebase/firebase-ios-sdk.git
exactVersion: 10.23.1
Expand Down
2 changes: 1 addition & 1 deletion Teacher/Teacher.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1779,7 +1779,7 @@
repositoryURL = "https://github.com/PSPDFKit/PSPDFKit-SP";
requirement = {
kind = exactVersion;
version = 13.9.1;
version = 14.1.1;
};
};
/* End XCRemoteSwiftPackageReference section */
Expand Down
21 changes: 21 additions & 0 deletions setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#
# This file is part of Canvas.
# Copyright (C) 2019-present Instructure, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#

git config commit.template .gitcommit
cd rn/Teacher
yarn build