Do I need to translate super when overriding data sources and delegate methods to UITableViewController?

Consider the following snippet that displays a custom view controller from UITableViewController.

class Controller: UITableViewController {
    ...
)

// MARK: - Table View Data Source

extension Controller {

    override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        // call super?
        ...
    }

}

// MARK: - Table View Delegate

extension Controller {

    override func tableView(tableView: UITableView, willBeginEditingRowAtIndexPath indexPath: NSIndexPath) {
        // call super?
        ...
    }

}

The documentation says:

You can override loadView or any other method of the superclass, but if you really call the implementation of the superclass of the method, usually like calling the first method.

My question is, does this also apply to the methods in the protocols UITableViewDataSourceand UITableViewDelegateto which it matches UITableViewController?

super , , . . , super willBeginEditingRowAtIndexPath, , .

+4
2

. , , . , UITableViewDataSource UITableViewDelegate - ( ), , , .

0

, , .

0

Source: https://habr.com/ru/post/1610241/


All Articles