Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
3์ฃผ์ฐจ
3์ฃผ์ฐจ ์ธ๋ฏธ๋ -2 ์์๋ ๊ฐ๋จํ ๊ฐค๋ฌ๋ฆฌ ํด๋ก ์ฝ๋ฉ์ ํตํ์ฌ CollectionTableView ์ ๋ํ ๊ฐ๋ ์ ๊ณต๋ถํ์์ต๋๋ค.
์ฃผ์์ฝ๋
PhotoCollectionViewCell ํ์ผ ๋ด์์ Closure ๋ฅผ ์ ์ฅํ ์ ์๋ Optional Stored Property ๊ตฌํํ ๋ค, heartButtonTap ํ์์ ๋ ํด๋ก์ ๊ฐ ํธ์ถ๋๊ณ , VC ์์๋ ํด๋ก์ ๊ตฌ๋ฌธ์ด ์คํ๋ฉ๋๋ค. ์ต์ ๋์ด๊ธฐ ๋๋ฌธ์ ๋ฐ์ธ๋ฉํด์ ์ฌ์ฉํ๋ ๊ฒ์ด ๋ ์ข์ต๋๋ค!
๋ํ cellForItemAt ์ ํตํ์ฌ ์คํฌ๋กค์ ๋งจ ์๋๊น์ง ๋ด๋ ธ๋ค๊ฐ ๋ค์ ์ฌ๋ผ์๋ ํํธtap ์ฌ๋ถ๊ฐ ๋จ์์๋๋ก ์์ ํ์์ต๋๋ค.
heartImage ๋ฅผ ๋ฐ๋ก asset์ ์ถ๊ฐํด์ฃผ์ง ์์๋ ๋ด๋ถ์์ ๋ถ๋ฌ์ฌ ์ ์๋์ง ์ฒ์ ์์์ต๋๋ค!
์ค์ต๊ฒฐ๊ณผ
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-08-01.at.17.32.07.mp4
#6