Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2주차 오류 해결 #10

Open
earlysummer0303 opened this issue Mar 17, 2022 · 1 comment
Open

2주차 오류 해결 #10

earlysummer0303 opened this issue Mar 17, 2022 · 1 comment

Comments

@earlysummer0303
Copy link
Collaborator

2주차 미션에서 테이블 뷰로 특정 셀을 선택하면 그 바로 이전에 클릭한 셀에 대한 정보가 나오는 오류가 있었다고 말씀드렸는데,
그 원인은 제가 UITableViewDelegate 에 대한 tableview 함수에서 파라미터로 'didSelectRowAt' 대신에 실수로 'didDeSelectRowAt' 을 사용한 것이었습니다. tableview 함수는 주로 자동완성으로 만들어 놔서 이름이 비슷해서 생긴 실수인듯 합니다. 앞으로 정신 차리고 확인 잘 해야겠네요 ㅠㅠ

'didDeSelectRowAt'의 경우 해당 셀이 선택 해제될 때를 기준으로 하기 때문에, 첫번째로 셀을 누른 이벤트에는 응답을 하지 않고, 그 다음으로 다른 셀을 누르는 이벤트 부터 이전 셀에 대한 선택을 해제하는 것으로 간주되어, 이전 셀에 대한 정보를 표시하게 된 것으로 보입니다.

오류 해결해서 커밋했습니당

@earlysummer0303
Copy link
Collaborator Author

셀프 꿀밤 합니다🍯🌰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant