You can do in this way:
class mainTableViewController: UITableViewController {
//your functions here
}
//your custom cell class
class yourCustomCell:UITableViewCell,UITableViewDataSource,UITableViewDelegate{
@IBOutlet weak var innerTableView : UITableView?
var myArray : Array<Any> = []
override func awakeFromNib() {
super.awakeFromNib()
innerTableView?.dataSource = self
innerTableView?.delegate = self
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return myArray.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = UITableViewCell.init(style: .default, reuseIdentifier: "identifier")
return cell
}
}