diff options
author | Henrik Storch <henrik.storch@nextcloud.com> | 2022-03-21 11:25:24 +0300 |
---|---|---|
committer | Henrik Storch <henrik.storch@nextcloud.com> | 2022-04-28 08:14:34 +0300 |
commit | dd2652bd2b1e2e2fef804940a93e9387fe7e1584 (patch) | |
tree | 14a44afa51a908c11030fe3589a7ac46487ca0f0 /iOSClient/Extensions | |
parent | 1b428f52ed9a58ae80a154ab36792955ffefd5a8 (diff) |
Rename share permission types + fix file headers
- also remove addShaddow of `NCShareAdvancePermissionFooter`, doesn't seem to work in tablefooterview anyway
- linting: reduce warning range. Functions with 60 lines are still readable and ok, it's just important that functions don't grow enormously (100+)
Signed-off-by: Henrik Storch <henrik.storch@nextcloud.com>
Diffstat (limited to 'iOSClient/Extensions')
-rw-r--r-- | iOSClient/Extensions/DateFormatter+Extension.swift | 17 | ||||
-rw-r--r-- | iOSClient/Extensions/UIBarButton+Extension.swift | 24 | ||||
-rw-r--r-- | iOSClient/Extensions/UIToolbar+Extension.swift | 17 |
3 files changed, 32 insertions, 26 deletions
diff --git a/iOSClient/Extensions/DateFormatter+Extension.swift b/iOSClient/Extensions/DateFormatter+Extension.swift index 2c0fd0abe..aa126ce78 100644 --- a/iOSClient/Extensions/DateFormatter+Extension.swift +++ b/iOSClient/Extensions/DateFormatter+Extension.swift @@ -3,7 +3,22 @@ // Nextcloud // // Created by Henrik Storch on 18.03.22. -// Copyright © 2022 Marino Faggiana. All rights reserved. +// Copyright © 2022 Henrik Storch. All rights reserved. +// +// Author Henrik Storch <henrik.storch@nextcloud.com> +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. // import Foundation diff --git a/iOSClient/Extensions/UIBarButton+Extension.swift b/iOSClient/Extensions/UIBarButton+Extension.swift index b56554a47..242c6e0e6 100644 --- a/iOSClient/Extensions/UIBarButton+Extension.swift +++ b/iOSClient/Extensions/UIBarButton+Extension.swift @@ -53,27 +53,3 @@ extension UIBarButtonItem { _action() } } - -extension UIView { - enum VerticalLocation: String { - case bottom - case top - } - - func addShadow(location: VerticalLocation, height: CGFloat = 2, color: UIColor = .black, opacity: Float = 0.4, radius: CGFloat = 2) { - switch location { - case .bottom: - addShadow(offset: CGSize(width: 0, height: height), color: color, opacity: opacity, radius: radius) - case .top: - addShadow(offset: CGSize(width: 0, height: -height), color: color, opacity: opacity, radius: radius) - } - } - - private func addShadow(offset: CGSize, color: UIColor, opacity: Float, radius: CGFloat) { - self.layer.masksToBounds = false - self.layer.shadowColor = color.cgColor - self.layer.shadowOffset = offset - self.layer.shadowOpacity = opacity - self.layer.shadowRadius = radius - } -} diff --git a/iOSClient/Extensions/UIToolbar+Extension.swift b/iOSClient/Extensions/UIToolbar+Extension.swift index 5afae518c..72387b255 100644 --- a/iOSClient/Extensions/UIToolbar+Extension.swift +++ b/iOSClient/Extensions/UIToolbar+Extension.swift @@ -3,7 +3,22 @@ // Nextcloud // // Created by Henrik Storch on 18.03.22. -// Copyright © 2022 Marino Faggiana. All rights reserved. +// Copyright © 2022 Henrik Storch. All rights reserved. +// +// Author Henrik Storch <henrik.storch@nextcloud.com> +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU 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 General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. // import Foundation |