2
これは残念ながら、カスタムヘッダビューが表示されない私のコードスウィフト - セクションのヘッダーは
func tableView(tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 61.0
}
func tableView(tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let headerCell = tableView.dequeueReusableCellWithIdentifier("CustomHeaderCell") as! CustomHeaderCell
headerCell.titleLabel.text = "user data"
return headerCell
}
func numberOfSectionsInTableView(tableView: UITableView) -> Int {
return 2
}
で表示されません。しかし
、私が使用するだけで、この:
func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
return "user data"
}
セクションヘッダが存在している、私のカスタムヘッダビューのコードで何が間違っているのですか?彼らはそれを動作させるために
をtableViewDelegateに属するものの