Marino Faggiana 6 anni fa
parent
commit
c841710cda

+ 2 - 10
Nextcloud.xcodeproj/project.pbxproj

@@ -229,7 +229,6 @@
 		F73CCE321DC13798007E38D8 /* UICKeyChainStore.m in Sources */ = {isa = PBXBuildFile; fileRef = F73CCE2A1DC13798007E38D8 /* UICKeyChainStore.m */; };
 		F73D2A7421836C4700BCA11F /* NCOfflineSectionHeader.xib in Resources */ = {isa = PBXBuildFile; fileRef = F73D2A7321836C4700BCA11F /* NCOfflineSectionHeader.xib */; };
 		F73D2A762183725B00BCA11F /* NCOfflineFooter.xib in Resources */ = {isa = PBXBuildFile; fileRef = F73D2A752183725B00BCA11F /* NCOfflineFooter.xib */; };
-		F73D2A78218372D500BCA11F /* NCOfflineSectionHeaderFooter.swift in Sources */ = {isa = PBXBuildFile; fileRef = F73D2A77218372D400BCA11F /* NCOfflineSectionHeaderFooter.swift */; };
 		F73D71621F2673C200E233EB /* NCText.swift in Sources */ = {isa = PBXBuildFile; fileRef = F73D71611F2673C200E233EB /* NCText.swift */; };
 		F73D71641F2674A400E233EB /* NCText.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F73D71631F2674A400E233EB /* NCText.storyboard */; };
 		F73F537F1E929C8500F8678D /* CCMore.swift in Sources */ = {isa = PBXBuildFile; fileRef = F73F537E1E929C8500F8678D /* CCMore.swift */; };
@@ -429,7 +428,6 @@
 		F7632FBF21832F8700721B71 /* NCTrashHeaderMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7632FBE21832F8700721B71 /* NCTrashHeaderMenu.xib */; };
 		F7632FC1218353AA00721B71 /* NCTrashSectionFooter.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7632FC0218353AA00721B71 /* NCTrashSectionFooter.xib */; };
 		F7632FD921836A5B00721B71 /* NCOfflineSectionHeaderMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7632FD621836A5B00721B71 /* NCOfflineSectionHeaderMenu.xib */; };
-		F7632FDA21836A5B00721B71 /* NCOfflineSectionFooter.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7632FD721836A5B00721B71 /* NCOfflineSectionFooter.xib */; };
 		F7632FDB21836A5B00721B71 /* NCOfflineHeaderFooter.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7632FD821836A5B00721B71 /* NCOfflineHeaderFooter.swift */; };
 		F7632FE021836A7100721B71 /* NCOfflineListCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = F7632FDC21836A7000721B71 /* NCOfflineListCell.xib */; };
 		F7632FE121836A7100721B71 /* NCOfflineGridCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7632FDD21836A7000721B71 /* NCOfflineGridCell.swift */; };
@@ -1047,7 +1045,6 @@
 		F73CCE2A1DC13798007E38D8 /* UICKeyChainStore.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UICKeyChainStore.m; sourceTree = "<group>"; };
 		F73D2A7321836C4700BCA11F /* NCOfflineSectionHeader.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NCOfflineSectionHeader.xib; sourceTree = "<group>"; };
 		F73D2A752183725B00BCA11F /* NCOfflineFooter.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NCOfflineFooter.xib; sourceTree = "<group>"; };
-		F73D2A77218372D400BCA11F /* NCOfflineSectionHeaderFooter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCOfflineSectionHeaderFooter.swift; sourceTree = "<group>"; };
 		F73D71611F2673C200E233EB /* NCText.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCText.swift; sourceTree = "<group>"; };
 		F73D71631F2674A400E233EB /* NCText.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = NCText.storyboard; sourceTree = "<group>"; };
 		F73F537E1E929C8500F8678D /* CCMore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CCMore.swift; sourceTree = "<group>"; };
@@ -1339,7 +1336,6 @@
 		F7632FBE21832F8700721B71 /* NCTrashHeaderMenu.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NCTrashHeaderMenu.xib; sourceTree = "<group>"; };
 		F7632FC0218353AA00721B71 /* NCTrashSectionFooter.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NCTrashSectionFooter.xib; sourceTree = "<group>"; };
 		F7632FD621836A5B00721B71 /* NCOfflineSectionHeaderMenu.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NCOfflineSectionHeaderMenu.xib; sourceTree = "<group>"; };
-		F7632FD721836A5B00721B71 /* NCOfflineSectionFooter.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NCOfflineSectionFooter.xib; sourceTree = "<group>"; };
 		F7632FD821836A5B00721B71 /* NCOfflineHeaderFooter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCOfflineHeaderFooter.swift; sourceTree = "<group>"; };
 		F7632FDC21836A7000721B71 /* NCOfflineListCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NCOfflineListCell.xib; sourceTree = "<group>"; };
 		F7632FDD21836A7000721B71 /* NCOfflineGridCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NCOfflineGridCell.swift; sourceTree = "<group>"; };
@@ -2898,13 +2894,11 @@
 		F7632FD521836A3F00721B71 /* Section */ = {
 			isa = PBXGroup;
 			children = (
-				F7632FD821836A5B00721B71 /* NCOfflineHeaderFooter.swift */,
 				F70BE2582184581000425587 /* NCOfflineHeaderMenu.xib */,
 				F7632FD621836A5B00721B71 /* NCOfflineSectionHeaderMenu.xib */,
-				F73D2A752183725B00BCA11F /* NCOfflineFooter.xib */,
-				F73D2A77218372D400BCA11F /* NCOfflineSectionHeaderFooter.swift */,
 				F73D2A7321836C4700BCA11F /* NCOfflineSectionHeader.xib */,
-				F7632FD721836A5B00721B71 /* NCOfflineSectionFooter.xib */,
+				F73D2A752183725B00BCA11F /* NCOfflineFooter.xib */,
+				F7632FD821836A5B00721B71 /* NCOfflineHeaderFooter.swift */,
 			);
 			path = Section;
 			sourceTree = "<group>";
@@ -3935,7 +3929,6 @@
 				F7D423461F0596AC009C9782 /* Reader-Mark-N@3x.png in Resources */,
 				F7F54CE61E5B14C700E19C62 /* ImageError@2x.png in Resources */,
 				F7F54CEF1E5B14C700E19C62 /* ImageSelectedSmallOff@2x.png in Resources */,
-				F7632FDA21836A5B00721B71 /* NCOfflineSectionFooter.xib in Resources */,
 				F7F54CFF1E5B14C700E19C62 /* UIBarButtonItemArrowRight@3x.png in Resources */,
 				F774DF0F1FCC26BE002AF9FC /* iTunesArtwork@1x.png in Resources */,
 				F70BE2592184581000425587 /* NCOfflineHeaderMenu.xib in Resources */,
@@ -4315,7 +4308,6 @@
 				F73B4F0B1F470D9100BBEE4B /* nsGB2312Prober.cpp in Sources */,
 				F762CAFE1EACB66200B38484 /* XLFormLeftRightSelectorCell.m in Sources */,
 				F77B0E301D118A16002130FE /* CCHud.m in Sources */,
-				F73D2A78218372D500BCA11F /* NCOfflineSectionHeaderFooter.swift in Sources */,
 				F7D423891F0596C6009C9782 /* ReaderViewController.m in Sources */,
 				F70022E91EC4C9100080073F /* OCXMLShareByLinkParser.m in Sources */,
 				F70022E31EC4C9100080073F /* OCXMLParser.m in Sources */,

+ 11 - 1
iOSClient/Offline/Section/NCOfflineHeaderFooter.swift

@@ -23,12 +23,13 @@
 
 import Foundation
 
-class NCOfflineHeader: UICollectionReusableView {
+class NCOfflineSectionHeaderMenu: UICollectionReusableView {
     
     @IBOutlet weak var buttonMore: UIButton!
     @IBOutlet weak var buttonSwitch: UIButton!
     @IBOutlet weak var buttonOrder: UIButton!
     @IBOutlet weak var buttonOrderWidthConstraint: NSLayoutConstraint!
+    @IBOutlet weak var labelSection: UILabel!
     @IBOutlet weak var separator: UIView!
     
     var delegate: NCOfflineHeaderDelegate?
@@ -104,6 +105,15 @@ protocol NCOfflineHeaderDelegate {
     func tapOrderHeader(sender: Any)
 }
 
+class NCOfflineSectionHeader: UICollectionReusableView {
+    
+    @IBOutlet weak var labelSection: UILabel!
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+    }
+}
+
 class NCOfflineFooter: UICollectionReusableView {
     
     @IBOutlet weak var labelFooter: UILabel!

+ 1 - 1
iOSClient/Offline/Section/NCOfflineHeaderMenu.xib

@@ -12,7 +12,7 @@
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <collectionReusableView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" reuseIdentifier="header" id="tys-A2-nDX" customClass="NCOfflineHeader" customModule="Nextcloud" customModuleProvider="target">
+        <collectionReusableView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" reuseIdentifier="headerMenu" id="tys-A2-nDX" customClass="NCOfflineSectionHeaderMenu" customModule="Nextcloud" customModuleProvider="target">
             <rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
             <autoresizingMask key="autoresizingMask"/>
             <subviews>

+ 0 - 35
iOSClient/Offline/Section/NCOfflineSectionFooter.xib

@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
-    <device id="retina4_7" orientation="portrait">
-        <adaptation id="fullscreen"/>
-    </device>
-    <dependencies>
-        <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
-        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
-        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <collectionReusableView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" reuseIdentifier="sectionFooter" id="Vin-9E-7nW" customClass="NCOfflineSectionFooter" customModule="Nextcloud" customModuleProvider="target">
-            <rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
-            <autoresizingMask key="autoresizingMask"/>
-            <subviews>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="LabelSectionFooter" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gzy-cT-Gjn" userLabel="LabelFooter">
-                    <rect key="frame" x="10" y="17" width="355" height="16"/>
-                    <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-            </subviews>
-            <color key="backgroundColor" red="0.59999999999999998" green="0.80000000000000004" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
-            <constraints>
-                <constraint firstAttribute="trailing" secondItem="gzy-cT-Gjn" secondAttribute="trailing" constant="10" id="QzY-ac-CRO"/>
-                <constraint firstItem="gzy-cT-Gjn" firstAttribute="centerY" secondItem="Vin-9E-7nW" secondAttribute="centerY" id="avP-sX-JB5"/>
-                <constraint firstItem="gzy-cT-Gjn" firstAttribute="leading" secondItem="Vin-9E-7nW" secondAttribute="leading" constant="10" id="hZz-MT-pHg"/>
-            </constraints>
-            <viewLayoutGuide key="safeArea" id="EFn-SN-cxu"/>
-        </collectionReusableView>
-    </objects>
-</document>

+ 4 - 1
iOSClient/Offline/Section/NCOfflineSectionHeader.xib

@@ -16,7 +16,7 @@
             <rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="LabelSectionHeader" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gzy-cT-Gjn" userLabel="LabelFooter">
+                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="LabelSectionHeader" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gzy-cT-Gjn" userLabel="Label Section">
                     <rect key="frame" x="10" y="17" width="355" height="16"/>
                     <fontDescription key="fontDescription" type="system" pointSize="13"/>
                     <nil key="textColor"/>
@@ -30,6 +30,9 @@
                 <constraint firstItem="gzy-cT-Gjn" firstAttribute="leading" secondItem="Vin-9E-7nW" secondAttribute="leading" constant="10" id="hZz-MT-pHg"/>
             </constraints>
             <viewLayoutGuide key="safeArea" id="EFn-SN-cxu"/>
+            <connections>
+                <outlet property="labelSection" destination="gzy-cT-Gjn" id="yG6-wJ-CmI"/>
+            </connections>
         </collectionReusableView>
     </objects>
 </document>

+ 0 - 40
iOSClient/Offline/Section/NCOfflineSectionHeaderFooter.swift

@@ -1,40 +0,0 @@
-//
-//  NCOfflineHeaderFooter.swift
-//  Nextcloud
-//
-//  Created by Marino Faggiana on 09/10/2018.
-//  Copyright © 2018 Marino Faggiana. All rights reserved.
-//
-//  Author Marino Faggiana <m.faggiana@twsweb.it>
-//
-//  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
-
-class NCOfflineSectionHeader: UICollectionReusableView {
-    
-    override func awakeFromNib() {
-        super.awakeFromNib()
-    }
-    
-    
-}
-
-class NCOfflineSectionFooter: UICollectionReusableView {
-    
-    override func awakeFromNib() {
-        super.awakeFromNib()
-    }
-}

+ 2 - 1
iOSClient/Offline/Section/NCOfflineSectionHeaderMenu.xib

@@ -12,7 +12,7 @@
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <collectionReusableView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" reuseIdentifier="header" id="tys-A2-nDX" customClass="NCOfflineHeader" customModule="Nextcloud" customModuleProvider="target">
+        <collectionReusableView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" reuseIdentifier="sectionHeaderMenu" id="tys-A2-nDX" customClass="NCOfflineSectionHeaderMenu" customModule="Nextcloud" customModuleProvider="target">
             <rect key="frame" x="0.0" y="0.0" width="375" height="153"/>
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
@@ -85,6 +85,7 @@
                 <outlet property="buttonOrder" destination="0bo-yl-t5k" id="Kbw-BG-73C"/>
                 <outlet property="buttonOrderWidthConstraint" destination="jvv-Ug-l3I" id="E6N-z6-2VC"/>
                 <outlet property="buttonSwitch" destination="1LD-cd-zhc" id="Ec2-cM-CoY"/>
+                <outlet property="labelSection" destination="1yB-zO-8wr" id="Tqb-N6-ewI"/>
                 <outlet property="separator" destination="LZu-Te-clJ" id="EwO-za-LxT"/>
             </connections>
             <point key="canvasLocation" x="138.40000000000001" y="190.25487256371815"/>