iOS (기능)
[SWIFT] UITableView의 클릭 이벤트, 배경색상 없애기
겸손할 겸
2017. 9. 18. 11:23
[코드]
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { .... cell.selectionStyle = .none ... }
셀렉션 스타일을 none으로 잡는다.
allowSelection을 막아버리면 didSelect가 호출되지 않기 때문에, 위의 셀의 selection style을 none으로 설정하면 didSelect도 정상 작동한다.