2

By default I had expected, that in Swift the method signature includes the method name and it parameter types. But then I faced with protocol UITableViewDataSource containing:

optional public func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? 

optional public func tableView(tableView: UITableView, titleForFooterInSection section: Int) -> String?

The external parameter name (titleForHeaderInSection vs titleForFooterInSection) is the only difference in this methods.

So am I right, that external parameter also defines the method signature, or I have missed something? Function section in swift documentation does not help me with that.

Set
  • 47,577
  • 22
  • 132
  • 150

0 Answers0