У меня есть tableView, который показывает содержимое массива.Добавить новый tableView в Swift
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { //currnet table information.
let cell = UITableViewCell()
if chartTitle[indexPath.row] == "Name" {
cell.textLabel?.text = chartTitle[indexPath.row]
}
else if ... {
......
}
return cell
}
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return chartTitle.count
}
Теперь я хочу, чтобы добавить новый Tableview, который показывает содержание другого массива, но это трудно для меня, чтобы реализовать, так как Tableview имеет тот же класс UITableView.
Как добавить новый tableView и управлять его строками в зависимости от другого массива?
Заранее спасибо.