Custom table view cell: IBOutlet label is nil

前端 未结 6 1575
走了就别回头了
走了就别回头了 2020-12-08 18:38

Consider the following simple view controller:

class ViewController: UIViewController, UITableViewDataSource {
    @IBOutlet weak var tableView: UITableView!         


        
6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-08 18:46

    Please make sure you are not doing any mistake while registering your nib(custom cell) in the viewdidload. Nib name and reuseIdentifiers should not be wrong.

提交回复
热议问题