     override func didReceiveMemoryWarning() {
         super.didReceiveMemoryWarning()
         // Dispose of any resources that can be recreated.
+    }
+
+    override func setEditing(_ editing: Bool, animated: Bool) {
+        super.setEditing(editing, animated: animated)
+        sampleTableView.isEditing = editing
     }
 
     private func setupDataSources() {


        func configure(dataSource: DataSource) {
            textLabel?.text = dataSource.title
        }
    }


        super.viewDidLoad()

        navigationItem.title = "TableView"
        navigationItem.rightBarButtonItem = editButtonItem

        view.addSubview(sampleTableView)
        setupDataSources()
