UITableView error in swift 3.0

Published on Author Code Father
UITableView error in swift 3.0

When migrating from Swift 2 to Swift 3 all table view datasource and delegate methods must be changed either by

  • declaring them as private and keeping the syntax (without any underscore)
    private func tableView(tableView : ...)
  • or using the new syntax (see the space character after the underscore)
    func tableView(_ tableView : ...)

Actually the compiler is supposed to display warnings about that and suggestions how to fix it.



Categories IOS