From 15ba1048c972804cfe97a9123755ff468b61a7b0 Mon Sep 17 00:00:00 2001 From: marinofaggiana Date: Wed, 4 May 2022 16:38:44 +0200 Subject: Clear Signed-off-by: marinofaggiana --- .../Images.xcassets/pdf-horizontal.imageset/Contents.json | 12 ------------ .../pdf-horizontal.imageset/swap-horizontal-variant.svg | 1 - .../Images.xcassets/pdf-vertical.imageset/Contents.json | 12 ------------ .../pdf-vertical.imageset/swap-vertical-variant.svg | 1 - iOSClient/Settings/Acknowledgements.rtf | 12 +++++++++++- 5 files changed, 11 insertions(+), 27 deletions(-) delete mode 100644 iOSClient/Images.xcassets/pdf-horizontal.imageset/Contents.json delete mode 100644 iOSClient/Images.xcassets/pdf-horizontal.imageset/swap-horizontal-variant.svg delete mode 100644 iOSClient/Images.xcassets/pdf-vertical.imageset/Contents.json delete mode 100644 iOSClient/Images.xcassets/pdf-vertical.imageset/swap-vertical-variant.svg diff --git a/iOSClient/Images.xcassets/pdf-horizontal.imageset/Contents.json b/iOSClient/Images.xcassets/pdf-horizontal.imageset/Contents.json deleted file mode 100644 index 9a580cc28..000000000 --- a/iOSClient/Images.xcassets/pdf-horizontal.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "filename" : "swap-horizontal-variant.svg", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/iOSClient/Images.xcassets/pdf-horizontal.imageset/swap-horizontal-variant.svg b/iOSClient/Images.xcassets/pdf-horizontal.imageset/swap-horizontal-variant.svg deleted file mode 100644 index b77ae3826..000000000 --- a/iOSClient/Images.xcassets/pdf-horizontal.imageset/swap-horizontal-variant.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/iOSClient/Images.xcassets/pdf-vertical.imageset/Contents.json b/iOSClient/Images.xcassets/pdf-vertical.imageset/Contents.json deleted file mode 100644 index 580932404..000000000 --- a/iOSClient/Images.xcassets/pdf-vertical.imageset/Contents.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "images" : [ - { - "filename" : "swap-vertical-variant.svg", - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/iOSClient/Images.xcassets/pdf-vertical.imageset/swap-vertical-variant.svg b/iOSClient/Images.xcassets/pdf-vertical.imageset/swap-vertical-variant.svg deleted file mode 100644 index 72050e85d..000000000 --- a/iOSClient/Images.xcassets/pdf-vertical.imageset/swap-vertical-variant.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/iOSClient/Settings/Acknowledgements.rtf b/iOSClient/Settings/Acknowledgements.rtf index 57bd9041d..202e39989 100644 --- a/iOSClient/Settings/Acknowledgements.rtf +++ b/iOSClient/Settings/Acknowledgements.rtf @@ -1,4 +1,4 @@ -{\rtf1\ansi\ansicpg1252\cocoartf2636 +{\rtf1\ansi\ansicpg1252\cocoartf2638 \cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fswiss\fcharset0 Helvetica-Bold;} {\colortbl;\red255\green255\blue255;} {\*\expandedcolortbl;;} @@ -206,4 +206,14 @@ MIT License\ \ Copyright (c) Jonas Gessner\ ____________________________________________\ +\ + +\f1\b EasyTipView +\f0\b0 \ +\ +MIT License\ +\ +Copyright (c) Teodor Patras\ +____________________________________________\ +\ } \ No newline at end of file -- cgit v1.2.3 From cfa261604825ca07099bc45f7fec29298514e8f0 Mon Sep 17 00:00:00 2001 From: marinofaggiana Date: Wed, 4 May 2022 17:26:30 +0200 Subject: Recognize Simultaneously Gesture Signed-off-by: marinofaggiana --- iOSClient/Viewer/NCViewerPDF/NCViewerPDF.swift | 36 +++++++++++++++++--------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/iOSClient/Viewer/NCViewerPDF/NCViewerPDF.swift b/iOSClient/Viewer/NCViewerPDF/NCViewerPDF.swift index 3e77c598f..2ffae21d9 100644 --- a/iOSClient/Viewer/NCViewerPDF/NCViewerPDF.swift +++ b/iOSClient/Viewer/NCViewerPDF/NCViewerPDF.swift @@ -25,7 +25,7 @@ import UIKit import PDFKit import EasyTipView -class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate, UIGestureRecognizerDelegate { +class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate { var metadata = tableMetadata() var imageIcon: UIImage? @@ -52,6 +52,9 @@ class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate, UIGestureRecogni private var pdfThumbnailScrollViewWidthAnchor: NSLayoutConstraint? private var pageViewWidthAnchor: NSLayoutConstraint? + private var swipePdfView: UISwipeGestureRecognizer? + private var edgePdfView: UIScreenEdgePanGestureRecognizer? + // MARK: - View Life Cycle required init?(coder aDecoder: NSCoder) { @@ -168,22 +171,24 @@ class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate, UIGestureRecogni tapPdfView.require(toFail: gesture) } - let swipePdfView = UISwipeGestureRecognizer(target: self, action: #selector(gestureClosePdfThumbnail)) - swipePdfView.direction = .right - pdfView.addGestureRecognizer(swipePdfView) + swipePdfView = UISwipeGestureRecognizer(target: self, action: #selector(gestureClosePdfThumbnail)) + if let swipePdfView = swipePdfView { + swipePdfView.direction = .right + swipePdfView.delegate = self + pdfView.addGestureRecognizer(swipePdfView) + } + + edgePdfView = UIScreenEdgePanGestureRecognizer(target: self, action: #selector(gestureOpenPdfThumbnail)) + if let edgePdfView = edgePdfView { + edgePdfView.edges = .right + edgePdfView.delegate = self + pdfView.addGestureRecognizer(edgePdfView) + } let swipePdfThumbnailScrollView = UISwipeGestureRecognizer(target: self, action: #selector(gestureClosePdfThumbnail)) swipePdfThumbnailScrollView.direction = .right pdfThumbnailScrollView.addGestureRecognizer(swipePdfThumbnailScrollView) - let edgePdfView = UIScreenEdgePanGestureRecognizer(target: self, action: #selector(gestureOpenPdfThumbnail)) - edgePdfView.edges = .right - pdfView.addGestureRecognizer(edgePdfView) - - let edgeView = UIScreenEdgePanGestureRecognizer(target: self, action: #selector(gestureOpenPdfThumbnail)) - edgeView.edges = .right - view.addGestureRecognizer(edgeView) - NotificationCenter.default.addObserver(self, selector: #selector(favoriteFile(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterFavoriteFile), object: nil) NotificationCenter.default.addObserver(self, selector: #selector(deleteFile(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterDeleteFile), object: nil) NotificationCenter.default.addObserver(self, selector: #selector(renameFile(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterRenameFile), object: nil) @@ -497,6 +502,13 @@ class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate, UIGestureRecogni } } +extension NCViewerPDF: UIGestureRecognizerDelegate { + + func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { + return true + } +} + extension NCViewerPDF: EasyTipViewDelegate { func easyTipViewDidTap(_ tipView: EasyTipView) { -- cgit v1.2.3 From f36bd50c76c17ba1b9d6706a24601cc6481b7b96 Mon Sep 17 00:00:00 2001 From: marinofaggiana Date: Thu, 5 May 2022 10:30:23 +0200 Subject: Fix background color - removed external lib Signed-off-by: marinofaggiana --- Nextcloud.xcodeproj/project.pbxproj | 17 --------- iOSClient/Settings/Acknowledgements.m | 5 ++- iOSClient/Settings/Acknowledgements.rtf | 53 +++++++++++--------------- iOSClient/Share/NCShareCommon.swift | 1 - iOSClient/Viewer/NCViewerPDF/NCViewerPDF.swift | 29 +++++++------- 5 files changed, 38 insertions(+), 67 deletions(-) diff --git a/Nextcloud.xcodeproj/project.pbxproj b/Nextcloud.xcodeproj/project.pbxproj index 9af5d3197..da9d48e9e 100644 --- a/Nextcloud.xcodeproj/project.pbxproj +++ b/Nextcloud.xcodeproj/project.pbxproj @@ -256,7 +256,6 @@ F76DA963277B760E0082465B /* Queuer in Frameworks */ = {isa = PBXBuildFile; productRef = F76DA962277B760E0082465B /* Queuer */; }; F76DA966277B76F30082465B /* UICKeyChainStore in Frameworks */ = {isa = PBXBuildFile; productRef = F76DA965277B76F30082465B /* UICKeyChainStore */; }; F76DA969277B77EA0082465B /* DropDown in Frameworks */ = {isa = PBXBuildFile; productRef = F76DA968277B77EA0082465B /* DropDown */; }; - F76DA96C277B78400082465B /* FSCalendar in Frameworks */ = {isa = PBXBuildFile; productRef = F76DA96B277B78400082465B /* FSCalendar */; }; F76DA96F277B78AE0082465B /* TLPhotoPicker in Frameworks */ = {isa = PBXBuildFile; productRef = F76DA96E277B78AE0082465B /* TLPhotoPicker */; }; F7707687263A853700A1BA94 /* NCContentPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = F765608E23BF813500765969 /* NCContentPresenter.swift */; }; F7707689263A896A00A1BA94 /* UIImage+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7B7504A2397D38E004E13EC /* UIImage+Extensions.swift */; }; @@ -1028,7 +1027,6 @@ F72DA9B425F53E4E00B87DB1 /* SwiftRichString in Frameworks */, F74E7720277A2EF40013B958 /* XLForm in Frameworks */, F73ADD1C265546890069EA0D /* SwiftEntryKit in Frameworks */, - F76DA96C277B78400082465B /* FSCalendar in Frameworks */, F76DA93F277B75870082465B /* KTVCocoaHTTPServer.xcframework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -2080,7 +2078,6 @@ F76DA962277B760E0082465B /* Queuer */, F76DA965277B76F30082465B /* UICKeyChainStore */, F76DA968277B77EA0082465B /* DropDown */, - F76DA96B277B78400082465B /* FSCalendar */, F76DA96E277B78AE0082465B /* TLPhotoPicker */, F710FC79277B7D0000AA9FBF /* Realm */, F710FC7B277B7D0000AA9FBF /* RealmSwift */, @@ -2209,7 +2206,6 @@ F76DA961277B760E0082465B /* XCRemoteSwiftPackageReference "Queuer" */, F76DA964277B76F10082465B /* XCRemoteSwiftPackageReference "UICKeyChainStore" */, F76DA967277B77E90082465B /* XCRemoteSwiftPackageReference "DropDown" */, - F76DA96A277B78400082465B /* XCRemoteSwiftPackageReference "FSCalendar" */, F76DA96D277B78AE0082465B /* XCRemoteSwiftPackageReference "TLPhotoPicker" */, F710FC78277B7CFF00AA9FBF /* XCRemoteSwiftPackageReference "realm-swift" */, F7233B3827835FA300F40A43 /* XCRemoteSwiftPackageReference "ChromaColorPicker" */, @@ -3261,14 +3257,6 @@ kind = branch; }; }; - F76DA96A277B78400082465B /* XCRemoteSwiftPackageReference "FSCalendar" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/WenchaoD/FSCalendar"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 2.0.0; - }; - }; F76DA96D277B78AE0082465B /* XCRemoteSwiftPackageReference "TLPhotoPicker" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/tilltue/TLPhotoPicker"; @@ -3455,11 +3443,6 @@ package = F76DA967277B77E90082465B /* XCRemoteSwiftPackageReference "DropDown" */; productName = DropDown; }; - F76DA96B277B78400082465B /* FSCalendar */ = { - isa = XCSwiftPackageProductDependency; - package = F76DA96A277B78400082465B /* XCRemoteSwiftPackageReference "FSCalendar" */; - productName = FSCalendar; - }; F76DA96E277B78AE0082465B /* TLPhotoPicker */ = { isa = XCSwiftPackageProductDependency; package = F76DA96D277B78AE0082465B /* XCRemoteSwiftPackageReference "TLPhotoPicker" */; diff --git a/iOSClient/Settings/Acknowledgements.m b/iOSClient/Settings/Acknowledgements.m index 971bdf17f..a808f36de 100644 --- a/iOSClient/Settings/Acknowledgements.m +++ b/iOSClient/Settings/Acknowledgements.m @@ -31,12 +31,13 @@ - (void)viewDidLoad { [super viewDidLoad]; - + NSURL *rtfPath = [[NSBundle mainBundle] URLForResource:@"Acknowledgements" withExtension:@"rtf"]; NSAttributedString *attributedStringWithRtf = [[NSAttributedString alloc] initWithURL:rtfPath options:@{NSDocumentTypeDocumentAttribute:NSRTFTextDocumentType} documentAttributes:nil error:nil]; self.txtTermini.attributedText = attributedStringWithRtf; - + + self.navigationController.navigationBar.backgroundColor = [UIColor whiteColor]; self.view.backgroundColor = [UIColor whiteColor]; self.title = NSLocalizedString(@"_acknowledgements_", nil); self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(cancelPressed)]; diff --git a/iOSClient/Settings/Acknowledgements.rtf b/iOSClient/Settings/Acknowledgements.rtf index 202e39989..d947cf932 100644 --- a/iOSClient/Settings/Acknowledgements.rtf +++ b/iOSClient/Settings/Acknowledgements.rtf @@ -8,7 +8,7 @@ \f0\fs24 \cf0 \ This software contains additional third party software. \ All the third party software included or linked is redistributed under the terms and conditions of their original licenses. \ -____________________________________________\ +__________________________________\ \ \f1\b Nextcloud iOS Communication Library\ @@ -29,12 +29,12 @@ SwiftyXMLParser - \f1\b \ SwiftyJSON - \f0\b0 MIT License (MIT) \ -____________________________________________\ +__________________________________\ \ \f1\b NYMnemonic - BIP 39 style mnemonic codes\ -\f0\b0 ____________________________________________\ +\f0\b0 __________________________________\ \ \f1\b OpenSSL\ @@ -45,7 +45,7 @@ ____________________________________________\ \f1\b \ \f0\b0 Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\ -____________________________________________\ +__________________________________\ \ \f1\b Realm @@ -54,7 +54,7 @@ ____________________________________________\ Apache License 2.0\ \ Copyright (c) 2014-2017 https://realm.io\ -____________________________________________\ +__________________________________\ \ \f1\b UICKeyChainStore @@ -63,7 +63,7 @@ ____________________________________________\ MIT License\ \ Copyright (c) kishikawa katsumi\ -____________________________________________\ +__________________________________\ \ \f1\b XLForm @@ -72,7 +72,7 @@ ____________________________________________\ MIT License\ \ Copyright (c) Xmartlabs ( http://xmartlabs.com )\ -____________________________________________\ +__________________________________\ \ \f1\b KTVHTTPCache @@ -81,7 +81,7 @@ ____________________________________________\ MIT License\ \ Copyright (c) libobjc\ -____________________________________________\ +__________________________________\ \ \f1\b SVGKit @@ -90,7 +90,7 @@ ____________________________________________\ https://github.com/SVGKit/SVGKit/blob/3.x/LICENSE\ \ Copyright (c) 2010-2011 Matt Rajca, 2011-2015 various authors (c) Tipbit Inc\ -____________________________________________\ +__________________________________\ \ \f1\b SwiftRichString @@ -99,7 +99,7 @@ ____________________________________________\ MIT License\ \ Copyright (c) Daniele Margutti\ -____________________________________________\ +__________________________________\ \ \f1\b QRCodeReader @@ -108,7 +108,7 @@ ____________________________________________\ MIT License\ \ Copyright (c) Yannick Loriot\ -____________________________________________\ +__________________________________\ \ \f1\b Parchment @@ -117,16 +117,7 @@ ____________________________________________\ MIT License\ \ Copyright (c) Martin Rechsteiner\ -____________________________________________\ -\ - -\f1\b FSCalendar -\f0\b0 \ -\ -MIT License\ -\ -Copyright (c) Wenchao Ding\ -____________________________________________\ +__________________________________\ \ \f1\b DropDown @@ -135,7 +126,7 @@ ____________________________________________\ MIT License\ \ Copyright (c) Kevin Hirsch\ -____________________________________________\ +__________________________________\ \ \f1\b TLPhotoPicker @@ -144,7 +135,7 @@ ____________________________________________\ MIT License\ \ Copyright (c) wade.hawk, junhyi.park@gmail.com\ -____________________________________________\ +__________________________________\ \ \f1\b SwiftEntryKit @@ -153,7 +144,7 @@ ____________________________________________\ MIT License\ \ Copyright (c) Daniel Huri, huri000@gmail.com\ -____________________________________________\ +__________________________________\ \ \f1\b FloatingPanel @@ -162,14 +153,14 @@ ____________________________________________\ MIT License\ \ Copyright (c) Shin Yamamoto shin@scenee.com\ -____________________________________________\ +__________________________________\ \ \f1\b MarkdownKit \f0\b0 \ \ MIT License\ -____________________________________________\ +__________________________________\ \ \f1\b Firebase Crashlytics @@ -178,7 +169,7 @@ ____________________________________________\ Apache License 2.0\ \ Copyright (c) Google Inc.\ -____________________________________________\ +__________________________________\ \ \f1\b Queuer @@ -187,7 +178,7 @@ ____________________________________________\ MIT License\ \ Copyright (c) Fabrizio Brancati\ -____________________________________________\ +__________________________________\ \ \f1\b TOPasscodeViewController @@ -196,7 +187,7 @@ ____________________________________________\ MIT License\ \ Copyright (c) Tim Oliver\ -____________________________________________\ +__________________________________\ \ \f1\b JGProgressHUD @@ -205,7 +196,7 @@ ____________________________________________\ MIT License\ \ Copyright (c) Jonas Gessner\ -____________________________________________\ +__________________________________\ \ \f1\b EasyTipView @@ -214,6 +205,6 @@ ____________________________________________\ MIT License\ \ Copyright (c) Teodor Patras\ -____________________________________________\ +__________________________________\ \ } \ No newline at end of file diff --git a/iOSClient/Share/NCShareCommon.swift b/iOSClient/Share/NCShareCommon.swift index 024f4356d..a33b7b2e8 100644 --- a/iOSClient/Share/NCShareCommon.swift +++ b/iOSClient/Share/NCShareCommon.swift @@ -21,7 +21,6 @@ // along with this program. If not, see . import UIKit -import FSCalendar import DropDown class NCShareCommon: NSObject { diff --git a/iOSClient/Viewer/NCViewerPDF/NCViewerPDF.swift b/iOSClient/Viewer/NCViewerPDF/NCViewerPDF.swift index 2ffae21d9..c7d4d4cd3 100644 --- a/iOSClient/Viewer/NCViewerPDF/NCViewerPDF.swift +++ b/iOSClient/Viewer/NCViewerPDF/NCViewerPDF.swift @@ -52,9 +52,6 @@ class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate { private var pdfThumbnailScrollViewWidthAnchor: NSLayoutConstraint? private var pageViewWidthAnchor: NSLayoutConstraint? - private var swipePdfView: UISwipeGestureRecognizer? - private var edgePdfView: UIScreenEdgePanGestureRecognizer? - // MARK: - View Life Cycle required init?(coder aDecoder: NSCoder) { @@ -66,7 +63,11 @@ class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate { filePath = CCUtility.getDirectoryProviderStorageOcId(metadata.ocId, fileNameView: metadata.fileNameView)! pdfDocument = PDFDocument(url: URL(fileURLWithPath: filePath)) let pageCount = CGFloat(pdfDocument?.pageCount ?? 0) - defaultBackgroundColor = pdfView.backgroundColor + if #available(iOS 13.0, *) { + defaultBackgroundColor = pdfView.backgroundColor + } else { + defaultBackgroundColor = .lightGray + } view.backgroundColor = defaultBackgroundColor navigationItem.rightBarButtonItem = UIBarButtonItem(image: UIImage(named: "more")!.image(color: NCBrandColor.shared.label, size: 25), style: .plain, target: self, action: #selector(self.openMenuMore)) @@ -171,19 +172,15 @@ class NCViewerPDF: UIViewController, NCViewerPDFSearchDelegate { tapPdfView.require(toFail: gesture) } - swipePdfView = UISwipeGestureRecognizer(target: self, action: #selector(gestureClosePdfThumbnail)) - if let swipePdfView = swipePdfView { - swipePdfView.direction = .right - swipePdfView.delegate = self - pdfView.addGestureRecognizer(swipePdfView) - } + let swipePdfView = UISwipeGestureRecognizer(target: self, action: #selector(gestureClosePdfThumbnail)) + swipePdfView.direction = .right + swipePdfView.delegate = self + pdfView.addGestureRecognizer(swipePdfView) - edgePdfView = UIScreenEdgePanGestureRecognizer(target: self, action: #selector(gestureOpenPdfThumbnail)) - if let edgePdfView = edgePdfView { - edgePdfView.edges = .right - edgePdfView.delegate = self - pdfView.addGestureRecognizer(edgePdfView) - } + let edgePdfView = UIScreenEdgePanGestureRecognizer(target: self, action: #selector(gestureOpenPdfThumbnail)) + edgePdfView.edges = .right + edgePdfView.delegate = self + pdfView.addGestureRecognizer(edgePdfView) let swipePdfThumbnailScrollView = UISwipeGestureRecognizer(target: self, action: #selector(gestureClosePdfThumbnail)) swipePdfThumbnailScrollView.direction = .right -- cgit v1.2.3