I'm having a problem with my UITableView
custom cell.
This is the UITableView code:
var contactName = ["Papa", "Mummy", "Ajay", "Deepak", "My"]
var phoneNumber = ["657464567", "354636346", "5436346", "6345634643", "5645634656"]
// MARK: - Table view data source
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return contactName.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! myTableViewCell
cell.name.text = contactName[indexPath.row]
return cell
}
And this is my custom cell code:
@IBOutlet weak var name: UILabel!
I double checked that everything is connected properly so please help me figure out why I'm having this problem.