1
Ich kann keine Texte in meinem Header-Abschnitt finden. Dies ist, wie stelle ich Kopfbereich:viewForHeaderInSection Abschnitt zeigt nicht die Kopfzeile
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return myDataSource[section].otherKeyValues.count
}
override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
return myDataSource.count
}
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell: AccordionDetailTableViewCell = (NSBundle.mainBundle().loadNibNamed("AccordionDetailTableViewCell", owner: self, options: nil).first as? AccordionDetailTableViewCell)!
// cell.headerLabel!.text = "This is a test"
let currentCellData = myDataSource[indexPath.section]
cell.headerLabel!.text = currentCellData.otherKeyValues[indexPath.row].key
cell.detailLabel!.text = currentCellData.otherKeyValues[indexPath.row].value
return cell
}
override func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view: AccordionHeaderView = (NSBundle.mainBundle().loadNibNamed("AccordionHeaderView", owner: self, options: nil).first as? AccordionHeaderView)!
view.tag = section
view.delegate = self
view.titleLabel!.text = myDataSource[section].dateCreated == nil || myDataSource[section].dateCreated == "" ? " " : myDataSource[section].dateCreated
return view
}
Artikel in Zellen angezeigt werden, und selbst wenn ich view.titleLabel!.text = "Hello"
eingestellt dann ist Hallo nicht angezeigt.
Ich bin mit UIViewController
und umgesetzt FZAccordionTableView
Was mache ich falsch hier?
Bitte heightForHeaderInSection Methode Ihrer Tableview implementieren – Aakash
ich Ihre Ansicht über UITableViewAutomaticDimension umgesetzt haben jetzt nichts scheint sogar Zellen auch nicht – Sam
für statische Höhe Gib ihnen gesehen zu werden und sehen Sie, ob sie sichtbar sind oder nicht – Aakash