私は現在、iOS 7 および iOS 8 用のアプリに取り組んでおり、Xcode 6 ビルド 7 を Swift でコーディングしています。カスタムセルを含むテーブルビューを取得したビューコントローラーの1つで、テーブルビュープロパティの編集を「true」に設定しても何も起こらず、削除ボタンが表示されませんが、デフォルトのセルを使用すると私の代わりにそれは動作します。
私はすべての必要な方法を使用しました
func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool {
return true
}
func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) {
if (editingStyle == UITableViewCellEditingStyle.Delete) {
// handle delete (by removing the data from your array and updating the tableview)
}
}
func tableView(tableView: UITableView, editingStyleForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCellEditingStyle {
return .Delete
}
誰も同じ問題を抱えていませんか?
ありがとう!!