Я хочу отобразить следующую ячейку по умолчанию, если сообщения недоступны:
![enter image description here](https://i.stack.imgur.com/XqHMD.png)
На этот раз моя ячейка будет отображаться так:
![enter image description here](https://i.stack.imgur.com/KogTP.png)
Я уже установил следующие кодовые строки в viewDidLoad
:
tableView.estimatedRowHeight = 150
tableView.rowHeight = UITableView.automaticDimension
В моем cellForRowAt
я установил следующеелинии:
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
switch self.postArray.count {
case 0:
let cell = tableView.dequeueReusableCell(withIdentifier: "KeineBeiträgeVorhanden")!
return cell
default:
let cell = tableView.dequeueReusableCell(withIdentifier: "DiscoveryCollectionViewCell", for: indexPath) as! DiscoveryCollectionViewCell
Но мой TableViewCell не отображается в нужном размере.Заранее спасибо за помощь!
С Рождеством всех !!!