at the moment I have a UITableView
where the user can add cells
that have a textLabel
inside of it.
That is how I set the label
:
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: WhishCell.reuseID, for: indexPath)
let currentWish = self.wishList[indexPath.row]
cell.textLabel?.text = currentWish.wishName
cell.backgroundColor = .clear
return cell
}
My question is, how I can custom textLabel
(font, constraints,...). I tried creating a custom UILabel
inside my WishCell
class but I can not access it in cellforRowAt
with cell.theLabel
.
I hope you understand my problem, I am very grateful for every help :)
SOLVED
I just forgot the as! WhishCell
in cellForRowAt
. Thanks for all your help :)