Marino Faggiana 6 年之前
父节点
当前提交
fae7670119
共有 2 个文件被更改,包括 13 次插入1 次删除
  1. 1 1
      iOSClient/Trash/NCTrash.storyboard
  2. 12 0
      iOSClient/Trash/NCTrash.swift

+ 1 - 1
iOSClient/Trash/NCTrash.storyboard

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="EFX-fO-Oip">
     <device id="retina4_7" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>

+ 12 - 0
iOSClient/Trash/NCTrash.swift

@@ -105,6 +105,18 @@ class NCTrash: UIViewController , UICollectionViewDataSource, UICollectionViewDe
                 
         return cell
     }
+    
+    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+        
+        let tableTrash = datasource[indexPath.item]
+        
+        if tableTrash.directory {
+        
+            let ncTrash:NCTrash = UIStoryboard(name: "NCTrash", bundle: nil).instantiateInitialViewController() as! NCTrash
+            ncTrash.path = tableTrash.filePath + tableTrash.fileName
+            self.navigationController?.pushViewController(ncTrash, animated: true)
+        }
+    }
 }
 
 class ListLayout: UICollectionViewFlowLayout {