doing animations
This commit is contained in:
parent
3f54cacab0
commit
82fce34c2e
|
|
@ -113,6 +113,11 @@ public class TableBaseRowBuilder<DataType, CellType where CellType: UITableViewC
|
|||
|
||||
// MARK: - Items manipulation -
|
||||
|
||||
public func remove(index index: Int, animated: UITableViewRowAnimation) {
|
||||
|
||||
//tableDirector?.tableView?.deleteRowsAtIndexPaths(<#T##indexPaths: [NSIndexPath]##[NSIndexPath]#>, withRowAnimation: <#T##UITableViewRowAnimation#>)
|
||||
}
|
||||
|
||||
public func item(index index: Int) -> DataType {
|
||||
return items[index]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,8 +84,8 @@ public class TablePrototypeRowBuilder<DataType: Hashable, CellType: Configurable
|
|||
}
|
||||
|
||||
public override func willUpdateDirector(director: TableDirector?) {
|
||||
super.willUpdateDirector(director)
|
||||
|
||||
//tableDirector = director
|
||||
if let tableView = director?.tableView, cell = tableView.dequeueReusableCellWithIdentifier(reusableIdentifier) as? CellType {
|
||||
prototypeCell = cell
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,11 +21,16 @@ class MainController: UIViewController {
|
|||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
let rows = TableRowBuilder<String, StoryboardImageTableViewCell>(items: ["1", "1", "1", "1"])
|
||||
let rows = TablePrototypeRowBuilder<String, StoryboardImageTableViewCell>(items: ["1", "1", "1", "1"])
|
||||
.action(.click) { [unowned self] e in
|
||||
self.performSegueWithIdentifier("headerfooter", sender: nil)
|
||||
}
|
||||
|
||||
let rows2 = TablePrototypeRowBuilder<String, StoryboardImageTableViewCell>(items: ["1", "1", "1", "1"])
|
||||
|
||||
rows.remove(index: 0, animated: .None)
|
||||
|
||||
tableDirector += rows
|
||||
tableDirector += rows2
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue