Marino Faggiana 6 жил өмнө
parent
commit
488f7041a8

+ 1 - 0
iOSClient/Activity/NCActivity.storyboard

@@ -118,6 +118,7 @@
                                 <connections>
                                     <outlet property="dataSource" destination="nhT-TJ-YvX" id="4jS-6C-FKt"/>
                                     <outlet property="delegate" destination="nhT-TJ-YvX" id="ab1-4g-bMH"/>
+                                    <outlet property="prefetchDataSource" destination="nhT-TJ-YvX" id="317-AD-uQe"/>
                                 </connections>
                             </tableView>
                         </subviews>

+ 9 - 3
iOSClient/Activity/NCActivity.swift

@@ -25,7 +25,7 @@ import Foundation
 import UIKit
 import SwiftRichString
 
-class NCActivity: UIViewController, UITableViewDataSource, UITableViewDelegate, DZNEmptyDataSetSource, DZNEmptyDataSetDelegate {
+class NCActivity: UIViewController, UITableViewDataSource, UITableViewDelegate, UITableViewDataSourcePrefetching, DZNEmptyDataSetSource, DZNEmptyDataSetDelegate {
     
     @IBOutlet weak var tableView: UITableView!
 
@@ -46,8 +46,6 @@ class NCActivity: UIViewController, UITableViewDataSource, UITableViewDelegate,
         tableView.allowsSelection = false
         tableView.separatorColor = UIColor.clear
         tableView.tableFooterView = UIView()
-        
-        // Add Refresh Control
         tableView.refreshControl = refreshControl
         
         // Configure Refresh Control
@@ -155,6 +153,14 @@ class NCActivity: UIViewController, UITableViewDataSource, UITableViewDelegate,
         return UITableView.automaticDimension
     }
     
+    func tableView(_ tableView: UITableView, prefetchRowsAt indexPaths: [IndexPath]) {
+        print("")
+    }
+    
+    func tableView(_ tableView: UITableView, cancelPrefetchingForRowsAt indexPaths: [IndexPath]) {
+        print("")
+    }
+    
     func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
         
         if let cell = tableView.dequeueReusableCell(withIdentifier: "tableCell", for: indexPath) as? activityTableViewCell {