guard let cell = tableView
.dequeueReusableCell(withIdentifier: cellIdentifier) as? FolderAndFileCell else {
print("some")
return
}
It says that
Non-void function should return a value
What should I return here?
Inside cellForRowAt
you have to
guard let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier) as? FolderAndFileCell else {
print("some")
return UITableViewCell()
}
This signature
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell
should has a non void return value
The well-know approach is
let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier) as! FolderAndFileCell
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With