10

問題は私のプロジェクトにあります。しかし、Master-Detail Application という新しい xcode ドラフト プロジェクトでも試しました。

基本セル クラスを作成し、セルをストーリーボードにマップしました。削除操作の後、deinit は呼び出されませんでした。セルへの強いまたは弱い参照はありません。

class Cell:UITableViewCell {
    deinit{
        print("Deinit Called")
    }
}


override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
    let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath) as! Cell

    let object = objects[indexPath.row] as! NSDate
    cell.textLabel!.text = object.description
    return cell
}
4

1 に答える 1