給每個有同樣掙扎的人。
override func numberOfSections(in tableView: UITableView) -> Int {
// #warning Incomplete implementation, return the number of sections
return 0
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// #warning Incomplete implementation, return the number of rows
return 0
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "reuseIdentifier", for: indexPath)
// Configure the cell...
return cell
}
也許我應該設置自定義類的UINavigationController,而不是:如果你有在的UITableViewController一個UINavigationController與否,創建自定義類後,你應該評論或刪除下面的方法,如果你有靜態細胞沒關係UITableViewController但我怎麼可以添加屬性,如果是這樣? – cameloper
顯示您的子類的代碼。 – pbasdf
我發現,你的猜測是對的。由Xcode自動添加的方法阻止顯示我的靜態單元格。謝謝! – cameloper