1
나는 많은 시간을 낭비 했으므로 좌절감을 털어 놓는다. allowMultipleSelection이 내 TableView에서 작동하지 않는 이유를 모르겠습니다. 작동시키기 위해 모든 일을해야하지만, 여전히 결과가 없습니다. 제 코드를 살펴보고 친절하게 문제를 알려주세요.Allow MultipleSelection이 Swift에서 작동하지 않습니까?
override func viewDidLoad()
{
super.viewDidLoad()
// Do any additional setup after loading the view.
self.participantsTableView.allowsMultipleSelection = true
}
if tableView == participantsTableView
{
var cell = tableView.cellForRowAtIndexPath(indexPath)!
if cell.accessoryType == UITableViewCellAccessoryType.Checkmark
{
cell.accessoryType = UITableViewCellAccessoryType.None
}
else
{
cell.accessoryType == UITableViewCellAccessoryType.Checkmark
}
self.participantsTableView.reloadData()
}
은 어디 코드'== participantsTableView ~있는 tableView 경우'을 배치해야합니까? 함수'tableView : didSelectRowAtIndexPath :'? 그렇다면 테이블을 다시로드 할 필요가 없습니다. – bluedome
"didSelectRowAtIndexPath"에서 예 및 나는 tableView를 다시로드하지 않고 동일하게 시도했습니다! – Developer
pls는 테이블의 데이터 소스 메소드 인'tableView : cellForRowAtIndexPath :'에 코드를 게시합니다. – bluedome