Browse Source

Fix background color - removed external lib

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 3 years ago
parent
commit
f36bd50c76

+ 0 - 17
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" */;

+ 3 - 2
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)];

+ 22 - 31
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\
-____________________________________________\
+__________________________________\
 \
 }

+ 0 - 1
iOSClient/Share/NCShareCommon.swift

@@ -21,7 +21,6 @@
 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import UIKit
-import FSCalendar
 import DropDown
 
 class NCShareCommon: NSObject {

+ 13 - 16
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