Необходимо из разных файлов вызывать данные в tableView.
Создал отдельный swift файл с таким содержанием:
import UIKit
class sas: UITableViewController {
func tv(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! TableViewCell
cell.dfg.text = "4321"
return cell
}
}
И в основном файле пытаюсь вызвать класс sas и функцию tv, которые в отдельном файле.
func customClass(someObject: sas) -> String {
return someObject.tv(UITableView, cellForRowAt: IndexPath)
}
В итоге выдает ошибку: Cannot convert value of type ‘UITableView.Type’ to expected argument type ‘UITableView’
Подскажите что я делаю не так