別のUserInterfaceを使用して、最後の行にテーブルビューにセルを追加したいと思います。ios swift uitableview最後のセルを追加する
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
var cell:JoinCell = tableView.dequeueReusableCellWithIdentifier(reuseIdentifier, forIndexPath: indexPath) as! JoinCell
let lastSectionIndex = tableView.numberOfSections-1
let lastSectionLastRow = tableView.numberOfRowsInSection(lastSectionIndex) - 1
let lastIndexPath = NSIndexPath(forRow:lastSectionLastRow, inSection: lastSectionIndex)
let cellIndexPath = tableView.indexPathForCell(cell)
if cellIndexPath == lastIndexPath {
cell = tableView.dequeueReusableCellWithIdentifier("JoinFooterCell") as! JoinFooterCell
}
私は、エラーメッセージ
「型の値を割り当てることができません 『JoinFooterCellは』 『JoinCell』を入力する」だ誰も私が助言与えることができていますか?ありがとう。
は、スタックオーバーフローへようこそ!あなたが書式設定してスクロールしないように手伝ってください。 – zhon