From 5b5fdf6b143a2f78e62d0fc275d73fb6ca827d8a Mon Sep 17 00:00:00 2001 From: Lucian Cerbu Date: Thu, 28 Sep 2023 10:37:11 +0300 Subject: [PATCH] Created a new view controller for displaying the pop-up menu with upload options. --- Permanent.xcodeproj/project.pbxproj | 18 +- ...wift => AddButtonMenuViewController.swift} | 75 +++--- ...ew.xib => AddButtonMenuViewController.xib} | 246 +++++++++--------- .../ViewControllers/BaseViewController.swift | 8 - .../ViewController/MainViewController.swift | 20 +- .../ViewController/SharesViewController.swift | 48 +++- 6 files changed, 222 insertions(+), 193 deletions(-) rename Permanent/Common/Base/UIKitViews/AddButtonMenu/{AddButtonMenuView.swift => AddButtonMenuViewController.swift} (51%) rename Permanent/Common/Base/UIKitViews/AddButtonMenu/{AddButtonMenuView.xib => AddButtonMenuViewController.xib} (71%) diff --git a/Permanent.xcodeproj/project.pbxproj b/Permanent.xcodeproj/project.pbxproj index 788e5d69..c0d272fc 100644 --- a/Permanent.xcodeproj/project.pbxproj +++ b/Permanent.xcodeproj/project.pbxproj @@ -80,7 +80,8 @@ 5E202E072981FD660063DDED /* ArchiveSettingsTagCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5E202E052981FD660063DDED /* ArchiveSettingsTagCollectionViewCell.xib */; }; 5E218BF925A86C9E00B56625 /* PasswordElementView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E218BF725A86C9E00B56625 /* PasswordElementView.swift */; }; 5E218BFA25A86C9E00B56625 /* PasswordElementView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5E218BF825A86C9E00B56625 /* PasswordElementView.xib */; }; - 5E2657192AC2A7D1004ACFFE /* AddButtonMenuView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5E2657182AC2A7D1004ACFFE /* AddButtonMenuView.xib */; }; + 5E222FFF2AC446F0001D8665 /* AddButtonMenuViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E222FFD2AC446F0001D8665 /* AddButtonMenuViewController.swift */; }; + 5E2230002AC446F0001D8665 /* AddButtonMenuViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5E222FFE2AC446F0001D8665 /* AddButtonMenuViewController.xib */; }; 5E278898282D423F007EE374 /* AccountOnboardingPageOneWithPendingArchives.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E278897282D423E007EE374 /* AccountOnboardingPageOneWithPendingArchives.swift */; }; 5E27889A282D43CC007EE374 /* AccountOnboardingPageTwoWithPendingArchives.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E278899282D43CC007EE374 /* AccountOnboardingPageTwoWithPendingArchives.swift */; }; 5E29C1D525AEF22D00C2A230 /* SecurityViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E29C1D425AEF22D00C2A230 /* SecurityViewModel.swift */; }; @@ -164,8 +165,6 @@ 5E473A072A41887600A20D85 /* PHAssetExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC915F4F254718FA00C86012 /* PHAssetExtension.swift */; }; 5E497EDC2ABD88C20058A948 /* FABActionSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC120C5E253EF8F500C41243 /* FABActionSheet.swift */; }; 5E497EDD2ABD895E0058A948 /* FABView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC752BCE253EE52F00EF7941 /* FABView.swift */; }; - 5E497EEC2ABDA4D80058A948 /* AddButtonMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E497EEB2ABDA4D80058A948 /* AddButtonMenuView.swift */; }; - 5E497EED2ABDA4D80058A948 /* AddButtonMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E497EEB2ABDA4D80058A948 /* AddButtonMenuView.swift */; }; 5E4D0AEC2832695C00C6439C /* AccountOnboardingAcceptArchiveTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E4D0AEA2832695C00C6439C /* AccountOnboardingAcceptArchiveTableViewCell.swift */; }; 5E4D0AED2832695C00C6439C /* AccountOnboardingAcceptArchiveTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5E4D0AEB2832695C00C6439C /* AccountOnboardingAcceptArchiveTableViewCell.xib */; }; 5E4D0AF02832697A00C6439C /* AccountOnboardingMakeDefaultArchiveTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E4D0AEE2832697A00C6439C /* AccountOnboardingMakeDefaultArchiveTableViewCell.swift */; }; @@ -930,7 +929,8 @@ 5E202E052981FD660063DDED /* ArchiveSettingsTagCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ArchiveSettingsTagCollectionViewCell.xib; sourceTree = ""; }; 5E218BF725A86C9E00B56625 /* PasswordElementView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PasswordElementView.swift; sourceTree = ""; }; 5E218BF825A86C9E00B56625 /* PasswordElementView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PasswordElementView.xib; sourceTree = ""; }; - 5E2657182AC2A7D1004ACFFE /* AddButtonMenuView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AddButtonMenuView.xib; sourceTree = ""; }; + 5E222FFD2AC446F0001D8665 /* AddButtonMenuViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddButtonMenuViewController.swift; sourceTree = ""; }; + 5E222FFE2AC446F0001D8665 /* AddButtonMenuViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AddButtonMenuViewController.xib; sourceTree = ""; }; 5E278897282D423E007EE374 /* AccountOnboardingPageOneWithPendingArchives.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountOnboardingPageOneWithPendingArchives.swift; sourceTree = ""; }; 5E278899282D43CC007EE374 /* AccountOnboardingPageTwoWithPendingArchives.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountOnboardingPageTwoWithPendingArchives.swift; sourceTree = ""; }; 5E29C1D425AEF22D00C2A230 /* SecurityViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecurityViewModel.swift; sourceTree = ""; }; @@ -974,7 +974,6 @@ 5E46217925C1A2CA007642BE /* InputTextWithLabelElementViewViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = InputTextWithLabelElementViewViewController.xib; sourceTree = ""; }; 5E46386C276CAAF70035D8CE /* PublicProfilePersonalInfoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PublicProfilePersonalInfoViewController.swift; sourceTree = ""; }; 5E4739B42A40FDFA00A20D85 /* ShareManagementRepository.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ShareManagementRepository.swift; sourceTree = ""; }; - 5E497EEB2ABDA4D80058A948 /* AddButtonMenuView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddButtonMenuView.swift; sourceTree = ""; }; 5E4D0AEA2832695C00C6439C /* AccountOnboardingAcceptArchiveTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountOnboardingAcceptArchiveTableViewCell.swift; sourceTree = ""; }; 5E4D0AEB2832695C00C6439C /* AccountOnboardingAcceptArchiveTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AccountOnboardingAcceptArchiveTableViewCell.xib; sourceTree = ""; }; 5E4D0AEE2832697A00C6439C /* AccountOnboardingMakeDefaultArchiveTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountOnboardingMakeDefaultArchiveTableViewCell.swift; sourceTree = ""; }; @@ -2601,8 +2600,8 @@ 5E497EDE2ABD89740058A948 /* AddButtonMenu */ = { isa = PBXGroup; children = ( - 5E497EEB2ABDA4D80058A948 /* AddButtonMenuView.swift */, - 5E2657182AC2A7D1004ACFFE /* AddButtonMenuView.xib */, + 5E222FFD2AC446F0001D8665 /* AddButtonMenuViewController.swift */, + 5E222FFE2AC446F0001D8665 /* AddButtonMenuViewController.xib */, ); path = AddButtonMenu; sourceTree = ""; @@ -3844,6 +3843,7 @@ 5E31B630292FA9BC00934408 /* ShareManagementAccessRolesCollectionViewCell.xib in Resources */, 5ED0856C24E4256B00CDB4D3 /* OpenSans-SemiBold.ttf in Resources */, 5E3CD44E24EE7F390081B978 /* Onboarding.storyboard in Resources */, + 5E2230002AC446F0001D8665 /* AddButtonMenuViewController.xib in Resources */, 5E31B634292FA9EA00934408 /* ShareManagementAccessRolesHeaderCollectionReusableView.xib in Resources */, 5EE291B426F37AA200159F4D /* ArchiveScreenPendingArchiveDetailsTableViewCell.xib in Resources */, BCE8DA7C2566735C00842ABD /* BottomActionSheet.xib in Resources */, @@ -3876,7 +3876,6 @@ 06644A8D24EBF51A003CD359 /* BigLogoView.xib in Resources */, BC42EDB625BB116A0031B965 /* Invitations.storyboard in Resources */, BC8E794C257A8526008ED0F5 /* ArchiveTableViewCell.xib in Resources */, - 5E2657192AC2A7D1004ACFFE /* AddButtonMenuView.xib in Resources */, 5E03F40D291BD55600DFCE09 /* ShareManagementTitleCollectionViewCell.xib in Resources */, 5ED3B3A929F7D6D6000CFF48 /* LegacyPlanning.storyboard in Resources */, 5E048FD8292308B10023C929 /* ShareMangementAdditionalOptionCollectionViewCell.xib in Resources */, @@ -4531,7 +4530,6 @@ BC11C7FE25558E03008BDEFA /* UIContextualActionExtension.swift in Sources */, 5EB620252784871B001B9AFD /* EmailProfileItem.swift in Sources */, F5EAD0672822BBE900EC2584 /* AccountOnboardingPageThree.swift in Sources */, - 5E497EEC2ABDA4D80058A948 /* AddButtonMenuView.swift in Sources */, BC6D3B492514E45F00390927 /* EnvironmentProtocol.swift in Sources */, BCF4E5D8255C2EB2003505BA /* RecordExifVO.swift in Sources */, F58EBC2E25DE963800D2D383 /* SharedFilesViewModel.swift in Sources */, @@ -4547,6 +4545,7 @@ 5E991EF22A4F10ED006229C0 /* TextViewUIRepresentable.swift in Sources */, F5551E06261E2F5100A7C540 /* ShareNotificationPayload.swift in Sources */, 5E991EEC2A4D7D0C006229C0 /* FilesMetadataViewModel.swift in Sources */, + 5E222FFF2AC446F0001D8665 /* AddButtonMenuViewController.swift in Sources */, F5A0CE1E2701D48D0005B9F0 /* PARequestNotificationPayload.swift in Sources */, 924F16312A459C2E00B75D4E /* FlowGrid.swift in Sources */, 9220ACC22A179F88003797C9 /* LegacyPlanningStatusViewModel.swift in Sources */, @@ -4704,7 +4703,6 @@ 5E4739FB2A4187BF00A20D85 /* EstablishedInfoProfileItem.swift in Sources */, F561F84A299D6E7A00B3BD09 /* ShareEndpoint.swift in Sources */, F559F88F28FEE9690015A522 /* FileBrowserViewModel.swift in Sources */, - 5E497EED2ABDA4D80058A948 /* AddButtonMenuView.swift in Sources */, 5ED3B3B129F7E4FF000CFF48 /* LegacyPlanningStewardViewController.swift in Sources */, 9220ACC32A17A768003797C9 /* LegacyPlanningStatusViewModel.swift in Sources */, 5E473A072A41887600A20D85 /* PHAssetExtension.swift in Sources */, diff --git a/Permanent/Common/Base/UIKitViews/AddButtonMenu/AddButtonMenuView.swift b/Permanent/Common/Base/UIKitViews/AddButtonMenu/AddButtonMenuViewController.swift similarity index 51% rename from Permanent/Common/Base/UIKitViews/AddButtonMenu/AddButtonMenuView.swift rename to Permanent/Common/Base/UIKitViews/AddButtonMenu/AddButtonMenuViewController.swift index d03621cd..dd604796 100644 --- a/Permanent/Common/Base/UIKitViews/AddButtonMenu/AddButtonMenuView.swift +++ b/Permanent/Common/Base/UIKitViews/AddButtonMenu/AddButtonMenuViewController.swift @@ -1,12 +1,12 @@ // -// AddButtonMenuView.swift +// AddButtonMenuViewController.swift // Permanent // -// Created by Lucian Cerbu on 22.09.2023. +// Created by Lucian Cerbu on 27.09.2023. import UIKit -class AddButtonMenuView: UIView { +class AddButtonMenuViewController: UIViewController { @IBOutlet weak var menuBackgroundView: UIView! @IBOutlet weak var menuBottomConstraints: NSLayoutConstraint! @IBOutlet weak var createNewFolderBtn: UIButton! @@ -19,31 +19,22 @@ class AddButtonMenuView: UIView { static let addButtonMenuDismissView = NSNotification.Name("AddButtonMenuView.dismissView") - required init?(coder: NSCoder) { - super.init(coder: coder) - } - - override init(frame: CGRect) { - super.init(frame: frame) - xibSetup(frame: CGRect(x: 0, y: -100, width: frame.width, height: frame.height + 100)) - } - - override func point(inside point: CGPoint, with event: UIEvent?) -> Bool { - if point.y < 0 { - NotificationCenter.default.post(name: Self.addButtonMenuDismissView, object: self, userInfo: ["showMenu": false]) - } - return true + override func viewDidLoad() { + super.viewDidLoad() + initUI() } - override func touchesBegan(_ touches: Set, with event: UIEvent?) { - if let touch = touches.first, touch.view == self { - NotificationCenter.default.post(name: Self.addButtonMenuDismissView, object: self, userInfo: ["showMenu": false]) + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(true) + + menuBottomConstraints.constant = 0 + + UIView.animate(withDuration: 0.3) { + self.view.layoutIfNeeded() } } - func xibSetup(frame: CGRect) { - let view = loadXib() - view.frame = frame + func initUI() { view.backgroundColor = UIColor.black.withAlphaComponent(0.26) view.layer.masksToBounds = false @@ -52,25 +43,31 @@ class AddButtonMenuView: UIView { view.layer.shadowOpacity = 1 view.layer.shadowOffset = CGSize(width: 0, height: 0) - initUI() - - addSubview(view) - - menuBottomConstraints.constant = 60 + 32 - UIView.animate(withDuration: 0.3) { - self.layoutIfNeeded() - } - } - - func initUI() { menuBackgroundView.layer.cornerRadius = 32 separatorHeightConstrait.constant = 1/UIScreen.main.scale } - func loadXib() -> UIView { - let bundle = Bundle(for: type(of: self)) - let nib = UINib(nibName: "AddButtonMenuView", bundle: bundle) - guard let view = nib.instantiate(withOwner: self, options: nil).first as? UIView else { return UIView() } - return view + override func touchesBegan(_ touches: Set, with event: UIEvent?) { + guard let touchView = touches.first?.view else { return } + if touchView == self.view { + menuBottomConstraints.constant = -500 + + UIView.animate(withDuration: 0.3) { + self.view.layoutIfNeeded() + } completion: { _ in + NotificationCenter.default.post(name: Self.addButtonMenuDismissView, object: self, userInfo: ["showMenu": false]) + self.dismiss(animated: false) + } + } + } + + @IBAction func anyButtonTapped(_ sender: Any) { + menuBottomConstraints.constant = -500 + + UIView.animate(withDuration: 0.3) { + self.view.layoutIfNeeded() + } completion: { _ in + self.dismiss(animated: false) + } } } diff --git a/Permanent/Common/Base/UIKitViews/AddButtonMenu/AddButtonMenuView.xib b/Permanent/Common/Base/UIKitViews/AddButtonMenu/AddButtonMenuViewController.xib similarity index 71% rename from Permanent/Common/Base/UIKitViews/AddButtonMenu/AddButtonMenuView.xib rename to Permanent/Common/Base/UIKitViews/AddButtonMenu/AddButtonMenuViewController.xib index 833e3fae..8fccaa3c 100644 --- a/Permanent/Common/Base/UIKitViews/AddButtonMenu/AddButtonMenuView.xib +++ b/Permanent/Common/Base/UIKitViews/AddButtonMenu/AddButtonMenuViewController.xib @@ -15,200 +15,210 @@ - + - - - - - - - - - + + + + + + + + + + - + - + - - + + - + - + - + - + - - - - - + + + + + - + - - - - + + + - + - + - + - + - - - + + + - + - + - + - - - - - + + + + + - + - - - - + + + - + - + - + - + - - - - - + + + + + - + - - - - + + + - + - + - + - + - - - - - + + + + + - + - - - - + + + - + @@ -320,21 +333,22 @@ - - - - - + + + + + - + + - - - + + + - + diff --git a/Permanent/Common/Base/ViewControllers/BaseViewController.swift b/Permanent/Common/Base/ViewControllers/BaseViewController.swift index 9e6d3b99..65297a6e 100644 --- a/Permanent/Common/Base/ViewControllers/BaseViewController.swift +++ b/Permanent/Common/Base/ViewControllers/BaseViewController.swift @@ -108,14 +108,6 @@ class BaseViewController: UIViewController { view.addSubview(actionDialog!) view.presentPopup(actionDialog, overlayView: overlayView) } - - func showAddButtonMenu(overlayView: UIView?) { - let addButtonMenuView = AddButtonMenuView(frame: CGRect(origin: CGPoint(x: 0, y: view.bounds.height), size: view.bounds.size)) - addButtonMenuView.translatesAutoresizingMaskIntoConstraints = false - - view.addSubview(addButtonMenuView) - view.presentPopup(addButtonMenuView, overlayView: overlayView) - } func showFloatingActionIsland(withLeftItems leftItems: [FloatingActionItem], rightItems: [FloatingActionItem]) { floatingActionIsland = FloatingActionIslandViewController() diff --git a/Permanent/Modules/Main/ViewController/MainViewController.swift b/Permanent/Modules/Main/ViewController/MainViewController.swift index 5a194249..3e45572f 100644 --- a/Permanent/Modules/Main/ViewController/MainViewController.swift +++ b/Permanent/Modules/Main/ViewController/MainViewController.swift @@ -18,7 +18,6 @@ class MainViewController: BaseViewController { @IBOutlet var fabView: FABView! @IBOutlet var fileActionBottomView: BottomActionSheet! @IBOutlet weak var switchViewButton: UIButton! - var addButtonMenuView: AddButtonMenuView! private var isGridView = false @@ -120,7 +119,7 @@ class MainViewController: BaseViewController { } } - NotificationCenter.default.addObserver(forName: AddButtonMenuView.addButtonMenuDismissView, object: nil, queue: nil) { [weak self] notif in + NotificationCenter.default.addObserver(forName: AddButtonMenuViewController.addButtonMenuDismissView, object: nil, queue: nil) { [weak self] notif in guard let showMenu = notif.userInfo?["showMenu"] as? Bool else { return } if !showMenu { self?.closeMenuBtnTapped() @@ -1044,19 +1043,18 @@ extension MainViewController { extension MainViewController: FABViewDelegate { func didTap() { fabView.isHidden = true - self.navigationController?.navigationBar.alpha = 0.7 - self.addButtonMenuView = AddButtonMenuView(frame: self.view.frame) - self.addButtonMenuView.createNewFolderBtn.addTarget(self, action: #selector(createNewFolderBtnTapped), for: .touchUpInside) - self.addButtonMenuView.takePhotoVideoBtn.addTarget(self, action: #selector(takePhotoOrVideoBtnTapped), for: .touchUpInside) - self.addButtonMenuView.uploadPhotosFromLibraryBtn.addTarget(self, action: #selector(uploadPhotosFromLibraryBtnTapped), for: .touchUpInside) - self.addButtonMenuView.browseFilesBtn.addTarget(self, action: #selector(browseFilesBtnTapped), for: .touchUpInside) - self.view.addSubview(addButtonMenuView) + let vc = AddButtonMenuViewController() + + vc.modalPresentationStyle = .overCurrentContext + present(vc, animated: false) + vc.createNewFolderBtn.addTarget(self, action: #selector(createNewFolderBtnTapped), for: .touchUpInside) + vc.takePhotoVideoBtn.addTarget(self, action: #selector(takePhotoOrVideoBtnTapped), for: .touchUpInside) + vc.uploadPhotosFromLibraryBtn.addTarget(self, action: #selector(uploadPhotosFromLibraryBtnTapped), for: .touchUpInside) + vc.browseFilesBtn.addTarget(self, action: #selector(browseFilesBtnTapped), for: .touchUpInside) } @objc func closeMenuBtnTapped() { fabView.isHidden = false - self.navigationController?.navigationBar.alpha = 1 - self.addButtonMenuView.removeFromSuperview() } @objc func createNewFolderBtnTapped() { diff --git a/Permanent/Modules/Shares/ViewController/SharesViewController.swift b/Permanent/Modules/Shares/ViewController/SharesViewController.swift index eb48fb59..09d0dfc9 100644 --- a/Permanent/Modules/Shares/ViewController/SharesViewController.swift +++ b/Permanent/Modules/Shares/ViewController/SharesViewController.swift @@ -139,6 +139,13 @@ class SharesViewController: BaseViewController { self?.dismissFloatingActionIsland() } } + + NotificationCenter.default.addObserver(forName: AddButtonMenuViewController.addButtonMenuDismissView, object: nil, queue: nil) { [weak self] notif in + guard let showMenu = notif.userInfo?["showMenu"] as? Bool else { return } + if !showMenu { + self?.closeMenuBtnTapped() + } + } } override func viewDidLayoutSubviews() { @@ -1278,16 +1285,39 @@ extension SharesViewController: SortActionSheetDelegate { // MARK: - FABViewDelegate extension SharesViewController: FABViewDelegate { func didTap() { - guard let actionSheet = UIViewController.create( - withIdentifier: .fabActionSheet, - from: .main - ) as? FABActionSheet else { - showAlert(title: .error, message: .errorMessage) - return - } + fabView.isHidden = true + let vc = AddButtonMenuViewController() - actionSheet.delegate = self - navigationController?.display(viewController: actionSheet, modally: true) + vc.modalPresentationStyle = .overCurrentContext + present(vc, animated: false) + vc.createNewFolderBtn.addTarget(self, action: #selector(createNewFolderBtnTapped), for: .touchUpInside) + vc.takePhotoVideoBtn.addTarget(self, action: #selector(takePhotoOrVideoBtnTapped), for: .touchUpInside) + vc.uploadPhotosFromLibraryBtn.addTarget(self, action: #selector(uploadPhotosFromLibraryBtnTapped), for: .touchUpInside) + vc.browseFilesBtn.addTarget(self, action: #selector(browseFilesBtnTapped), for: .touchUpInside) + } + + @objc func closeMenuBtnTapped() { + fabView.isHidden = false + } + + @objc func createNewFolderBtnTapped() { + closeMenuBtnTapped() + didTapNewFolder() + } + + @objc func takePhotoOrVideoBtnTapped() { + closeMenuBtnTapped() + openCamera() + } + + @objc func uploadPhotosFromLibraryBtnTapped() { + closeMenuBtnTapped() + openPhotoLibrary() + } + + @objc func browseFilesBtnTapped() { + closeMenuBtnTapped() + openFileBrowser() } }