として最初のセルを返す保つ:テーブルビューが私のコードで選択し、[SWIFT】ここで
var currentRow = 0
var cellTapped:Bool = true
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("CheckOutTableViewCell", forIndexPath: indexPath) as! CheckOutTableViewCell
if indexPath.row == currentRow {
if cellTapped == false {
cell.checkBox.checkState = .Unchecked
} else if cellTapped == true{
cell.checkBox.checkState = .Checked
}
}
else{
cell.checkBox.checkState = .Unchecked
}
return cell as UITableViewCell
}
私tableview
確認が選択されたセルとして最初のセルを返しますたびに、それはなぜですか?ここでの問題は何ですか?
編集をご覧ください – Sofeda