switch indexPath row case let cell tableView dequeueReusableCell withI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
switch indexPath.row {
case 0:
let cell = tableView.dequeueReusableCell(withIdentifier: AddressCellView.identifier, for: indexPath) as! AddressCellView
cell.populate(title: "Address Line 1", address: self.store?.state.addCardState.addCardModel.address1 ?? "")
cell.delegate = self
return cell
case 1:
let cell = tableView.dequeueReusableCell(withIdentifier: AddressCellView.identifier, for: indexPath) as! AddressCellView
cell.populate(title: "Address Line 2", address: self.store?.state.addCardState.addCardModel.address2 ?? "")
cell.delegate = self
return cell
case 2:
let cell = tableView.dequeueReusableCell(withIdentifier: CountryCellView.identifier, for: indexPath) as! CountryCellView
cell.delegate = self
cell.populate(controller: self)
return cell
case 3:
let cell = tableView.dequeueReusableCell(withIdentifier: CityPostCellView.identifier, for: indexPath) as! CityPostCellView
cell.delegate = self
return cell
default:
return UITableViewCell()
}