Table View: Accessory Action을 주려면 Detail 관련 Accessory를 사용해야 한다

J.Noma·2021년 12월 11일
0

흔히 사용되는 Row click event에는 tableView(_, didSelectRowAt: IndexPath) 등의 메서드가 활용됩니다

Accessory click event도 유사하게 TableViewDelegate의 메서드를 활용하면 됩니다

Accessory click event

tableView(_, accessoryButtonTappedForRowWith: IndexPath)를 활용합니다

❗️주의❗️
해당 메서드는 Detail 관련 Accessory에 의해서만 trigger됩니다
Disclosure indicator와 Checkmark는 터치를 인식하지 않습니다


화면전환 쉽게 연결하기

profile
노션으로 이사갑니다 https://tungsten-run-778.notion.site/Study-Archive-98e51c3793684d428070695d5722d1fe

0개의 댓글