Marino Faggiana 6 lat temu
rodzic
commit
6da20cac2b
1 zmienionych plików z 17 dodań i 14 usunięć
  1. 17 14
      iOSClient/Trash/NCTrash.swift

+ 17 - 14
iOSClient/Trash/NCTrash.swift

@@ -50,6 +50,23 @@ class NCTrash: UIViewController , UICollectionViewDataSource, UICollectionViewDe
         })
     }
     
+    override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
+        super.viewWillTransition(to: size, with: coordinator)
+        
+        coordinator.animate(alongsideTransition: nil) { _ in
+            self.collectionView.collectionViewLayout.invalidateLayout()
+        }
+    }
+    
+    // MARK: tap cell
+    func tapRestoreDelegate(with fileID: String) {
+        
+    }
+    
+    func tapMoreDelegate(with fileID: String) {
+        
+    }
+    
     // MARK: collectionView methods
     func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
         return datasource.count
@@ -78,20 +95,6 @@ class NCTrash: UIViewController , UICollectionViewDataSource, UICollectionViewDe
                 
         return cell
     }
-    
-    override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
-        super.viewWillTransition(to: size, with: coordinator)
-        collectionView.collectionViewLayout.invalidateLayout()
-    }
-    
-    // MARK: tap cell
-    func tapRestoreDelegate(with fileID: String) {
-        
-    }
-    
-    func tapMoreDelegate(with fileID: String) {
-    
-    }
 }
 
 class ListLayout: UICollectionViewFlowLayout {