|
@@ -67,9 +67,8 @@ class NCViewerImage: UIViewController {
|
|
|
override func viewDidLoad() {
|
|
|
super.viewDidLoad()
|
|
|
|
|
|
- view.backgroundColor = NCBrandColor.shared.systemBackground
|
|
|
- textColor = NCBrandColor.shared.label
|
|
|
-
|
|
|
+ navigationItem.rightBarButtonItem = UIBarButtonItem.init(image: UIImage(named: "more")!.image(color: NCBrandColor.shared.label, size: 25), style: .plain, target: self, action: #selector(self.openMenuMore))
|
|
|
+
|
|
|
singleTapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(didSingleTapWith(gestureRecognizer:)))
|
|
|
panGestureRecognizer = UIPanGestureRecognizer(target: self, action: #selector(didPanWith(gestureRecognizer:)))
|
|
|
longtapGestureRecognizer = UILongPressGestureRecognizer()
|
|
@@ -104,20 +103,26 @@ class NCViewerImage: UIViewController {
|
|
|
progressView.progress = 0
|
|
|
|
|
|
setToolBar()
|
|
|
-
|
|
|
- navigationItem.rightBarButtonItem = UIBarButtonItem.init(image: UIImage(named: "more")!.image(color: NCBrandColor.shared.label, size: 25), style: .plain, target: self, action: #selector(self.openMenuMore))
|
|
|
-
|
|
|
- navigationController?.setNavigationBarHidden(false, animated: true)
|
|
|
- navigationController?.navigationBar.prefersLargeTitles = false
|
|
|
}
|
|
|
|
|
|
- override func viewWillDisappear(_ animated: Bool) {
|
|
|
- super.viewWillDisappear(animated)
|
|
|
+ override func viewWillAppear(_ animated: Bool) {
|
|
|
+ super.viewWillAppear(animated)
|
|
|
+
|
|
|
+ navigationController?.navigationBar.prefersLargeTitles = false
|
|
|
|
|
|
- if let navigationController = self.navigationController {
|
|
|
- if !navigationController.viewControllers.contains(self) {
|
|
|
- videoStop()
|
|
|
- }
|
|
|
+ if currentMode == .full {
|
|
|
+
|
|
|
+ navigationController?.setNavigationBarHidden(true, animated: false)
|
|
|
+ view.backgroundColor = .black
|
|
|
+ textColor = .white
|
|
|
+ progressView.isHidden = true
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ navigationController?.setNavigationBarHidden(false, animated: false)
|
|
|
+ view.backgroundColor = NCBrandColor.shared.systemBackground
|
|
|
+ textColor = NCBrandColor.shared.label
|
|
|
+ progressView.isHidden = false
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -133,6 +138,16 @@ class NCViewerImage: UIViewController {
|
|
|
NotificationCenter.default.addObserver(self, selector: #selector(triggerProgressTask(_:)), name: NSNotification.Name(rawValue: NCGlobal.shared.notificationCenterProgressTask), object:nil)
|
|
|
}
|
|
|
|
|
|
+ override func viewWillDisappear(_ animated: Bool) {
|
|
|
+ super.viewWillDisappear(animated)
|
|
|
+
|
|
|
+ if let navigationController = self.navigationController {
|
|
|
+ if !navigationController.viewControllers.contains(self) {
|
|
|
+ videoStop()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
override func viewDidDisappear(_ animated: Bool) {
|
|
|
super.viewDidDisappear(animated)
|
|
|
|
|
@@ -151,6 +166,7 @@ class NCViewerImage: UIViewController {
|
|
|
}
|
|
|
|
|
|
@objc func openMenuMore() {
|
|
|
+
|
|
|
let imageIcon = UIImage(contentsOfFile: CCUtility.getDirectoryProviderStorageIconOcId(currentMetadata.ocId, etag: currentMetadata.etag))
|
|
|
NCViewer.shared.toggleMenu(viewController: self, metadata: currentMetadata, webView: false, imageIcon: imageIcon)
|
|
|
}
|