diff --git a/Demo/Classes/Presentation/Controllers/AutolayoutCellsController.swift b/Demo/Classes/Presentation/Controllers/AutolayoutCellsController.swift index 94c7eeb..4ad780d 100644 --- a/Demo/Classes/Presentation/Controllers/AutolayoutCellsController.swift +++ b/Demo/Classes/Presentation/Controllers/AutolayoutCellsController.swift @@ -56,6 +56,15 @@ class AutolayoutCellsController: UIViewController { } tableDirector += section + + navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Clear", style: .done, target: self, action: #selector(clear)) + } + + @objc + func clear() { + + tableDirector.clear() + tableDirector.reload() } func getViewHeight(view: UIView, width: CGFloat) -> CGFloat {