My Tableview code is works and the data is read out but not displayed in the label

maybe someone here can help me. I’ve been working on it for days and just can’t get any further.

My app has an AppHomeViewController.swift which contains all the code. I have 2 TableViews, one of which is filled correctly. The 2nd one shows the bars but the labels are not filled. Of course I have tried to go through the whole thing step by step to find the error. However, I cannot explain what is going wrong.

The outlets are set as well as the identifire and the classe.

Translated with DeepL.com (free version)

`class MailingsTableViewCell: UITableViewCell {
@IBOutlet weak var customerLabel: UILabel!
@IBOutlet weak var jobnumberLabel: UILabel!
@IBOutlet weak var productLabel: UILabel!
@IBOutlet weak var serviceLabel: UILabel!

func configure(with mailings: DataModelsContainer.MailingsData) {
    print("Configuring cell with data: (mailings)")
    guard let customerLabel = customerLabel else {
        print("Error: customerLabel is nil")
        return
    }
    customerLabel.text = mailings.customer
}

}`

I have the prints output to see if any data arrives at all.

Configuring cell with data: MailingsData(customer: "InterCash", jobnumber: "DE-HW-2104112", product: "Warenversand", service: "Economy") Error: customerLabel is nil

`// MARK: – TableView DataSource Sorter Shipments

func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
    if tableView == self.tableView {
        //rint("funktion tableView 1")
        return dataModelsContainer?.shipmentData.count ?? 0
    } else if tableView == mailingsTableView {
        //print("funktion mailingsTableView 1")
        return dataModelsContainer?.mailingsData.count ?? 0
    }
    return 0
}

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    if tableView == self.tableView {
        let cell = tableView.dequeueReusableCell(withIdentifier: "ShipmentCell", for: indexPath) as! ShipmentTableViewCell

        if let shipment = dataModelsContainer?.shipmentData[indexPath.row] {
            cell.configure(with: shipment)
        }

        return cell
    } else if tableView == mailingsTableView {
        //let cell = mailingsTableView.dequeueReusableCell(withIdentifier: "MailingsCell", for: indexPath) as! MailingsTableViewCell
        let cell = tableView.dequeueReusableCell(withIdentifier: "MailingCell", for: indexPath) as! MailingsTableViewCell

        if let mailings = dataModelsContainer?.mailingsData[indexPath.row] {
            cell.configure(with: mailings)
        }

        return cell
    }
    fatalError("Unknown table view")
}`

I’m really at my wit’s end.
Please excuse the stupid questions, but IOS development is something completely new to me and this is the first code I’ve written in IOS. It looks accordingly but it’s just for learning purposes.
Maybe one of you knows what the problem is or how I can work around it and force it to work.

Attached is a small screen and it is about the lower table. The one above works.

Many thanks in advance for your help

New contributor

Sascha is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật