diff --git a/Tablet/TableDirector.swift b/Tablet/TableDirector.swift index 4858084..87239bc 100644 --- a/Tablet/TableDirector.swift +++ b/Tablet/TableDirector.swift @@ -52,11 +52,6 @@ public class TableDirector: NSObject, UITableViewDataSource, UITableViewDelegate } - - public func row(row: T) -> T { - - return row - } // MARK: Private methods diff --git a/TabletDemo/Classes/Presentation/Controllers/MainController.swift b/TabletDemo/Classes/Presentation/Controllers/MainController.swift index b77cdcf..77b07bc 100644 --- a/TabletDemo/Classes/Presentation/Controllers/MainController.swift +++ b/TabletDemo/Classes/Presentation/Controllers/MainController.swift @@ -9,6 +9,11 @@ import UIKit import Tablet +class TableUpdateTask { + + +} + class MainController: UIViewController { @IBOutlet weak var tableView: UITableView! { @@ -28,24 +33,28 @@ class MainController: UIViewController { let rows2 = TableRowBuilder(items: ["1", "1", "1", "1"]) + rowBuilder + .delete(indexes: [0], animated: .None) + .insert(["2"], atIndex: 0, animated: .None) + .update(index: 0, item: "", animated: .None) + .move([1, 2], toIndexes: [3, 4]) let section = TableSectionBuilder(headerTitle: "", footerTitle: "", rows: [rowBuilder]) + //tableView.moveRowAtIndexPath(<#T##indexPath: NSIndexPath##NSIndexPath#>, toIndexPath: <#T##NSIndexPath#>) + //tableView.deleteRowsAtIndexPaths(<#T##indexPaths: [NSIndexPath]##[NSIndexPath]#>, withRowAnimation: <#T##UITableViewRowAnimation#>) + //tableView.insertRowsAtIndexPaths(<#T##indexPaths: [NSIndexPath]##[NSIndexPath]#>, withRowAnimation: <#T##UITableViewRowAnimation#>) + //tableView.reloadRowsAtIndexPaths(<#T##indexPaths: [NSIndexPath]##[NSIndexPath]#>, withRowAnimation: <#T##UITableViewRowAnimation#>) + //tableView.moveSection(0, toSection: 0) //tableView.reloadSections([], withRowAnimation: .None) //tableView.deleteSections([], withRowAnimation: .None) //tableView.insertSections([], withRowAnimation: .None) - - tableDirector.performBatchUpdates { - rowBuilder - .delete(indexes: [0], animated: .None) - .insert(["2"], atIndex: 0, animated: .None) - .update(index: 0, item: "", animated: .None) - .move([1, 2], toIndexes: [3, 4]) + } tableDirector.append(section: section)