-
Notifications
You must be signed in to change notification settings - Fork 2
[FEAT/#115] 스티커 삭제 구현 #116
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-Authored-By: YeongHoon Song <37678646+0Hooni@users.noreply.github.com>
- 실제 User가 ViewModel에 존재할 때 수정 예정 Co-Authored-By: YeongHoon Song <37678646+0Hooni@users.noreply.github.com>
Co-Authored-By: YeongHoon Song <37678646+0Hooni@users.noreply.github.com>
Co-Authored-By: seuhong <66902876+hsw1920@users.noreply.github.com>
Co-Authored-By: seuhong <66902876+hsw1920@users.noreply.github.com>
Co-Authored-By: seuhong <66902876+hsw1920@users.noreply.github.com>
Co-Authored-By: seuhong <66902876+hsw1920@users.noreply.github.com>
Co-Authored-By: seuhong <66902876+hsw1920@users.noreply.github.com>
Co-Authored-By: YeongHoon Song <37678646+0Hooni@users.noreply.github.com>
Co-Authored-By: seuhong <66902876+hsw1920@users.noreply.github.com>
Co-Authored-By: seuhong <66902876+hsw1920@users.noreply.github.com>
Co-Authored-By: seuhong <66902876+hsw1920@users.noreply.github.com>
Co-Authored-By: seuhong <66902876+hsw1920@users.noreply.github.com>
Co-Authored-By: seuhong <66902876+hsw1920@users.noreply.github.com>
- StickerView가 추가되는 시점에 EditPhotoViewModel에 input을 주기 위해 필요했습니다. - StickerView 생성 책임을 기존에는 ViewController가 가졌지만, CanvasScrollView로 이전하면서 필요해졌습니다. Co-Authored-By: YeongHoon Song <37678646+0Hooni@users.noreply.github.com>
- ViewController에서 CanvasScrollView를 직접 참조하여 업데이트 하고 있던 방식을 변경하였습니다. - ViewController는 CanvasScrollView의 메서드 호출을 통해 요청해야 합니다. - CanvasScrollView의 updateCanvas 메서드의 가독성을 개선하였습니다. - 일부 메서드의 네이밍을 변경하였습니다. Co-Authored-By: YeongHoon Song <37678646+0Hooni@users.noreply.github.com>
Co-Authored-By: YeongHoon Song <37678646+0Hooni@users.noreply.github.com>
- CanvasScrollView의 imageView의 접근제어 수정 - ViewController에서 CanvasScrollView에게 SharePhoto Data를 요청하도록 변경 Co-Authored-By: YeongHoon Song <37678646+0Hooni@users.noreply.github.com>
Co-Authored-By: seuhong <66902876+hsw1920@users.noreply.github.com>
Co-Authored-By: seuhong <66902876+hsw1920@users.noreply.github.com>
Closed
2 tasks
Member
|
LGTM 함수 분리가 잘되어있네요!! |
youn9k
approved these changes
Nov 30, 2024
Kiyoung-Kim-57
approved these changes
Nov 30, 2024
Member
Kiyoung-Kim-57
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
함수가 역할 별로 분리가 잘 되어 있어요! 그리고 성능을 위해 Set을 사용해주신 점 인상 깊었습니다!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🤔 배경
📃 작업 내역
추가 작업
EditPhotoRoomViewController가 하위 View의 인스턴스를 지속적으로 접근하던 환경을 개선하였습니다.✅ 리뷰 노트
책임 분리 및 리팩토링
EditPhotoRoomViewController에서CanvasScrollView를 직접 참조하는 상황이 많았습니다.CanvasScrollView에 메서드를 요청하는 방식으로 리팩터링을 하였습니다.삭제 로직 관련
CanvasScrollView에서 특정StickerView를 찾기 위해[UUID: Index]형태의 인스턴스를 별도로 관리했었습니다.위와 같은 변경을 한 이유는 삭제시 Index기반으로 SubView 참조 하는 경우 삭제시 기존의 Index와 일치하지 않거나 Out of range와 같은 문제가 발생합니다.
이러한 상황을 개선하기 위해
CanvasScrollView에서StickerViewDictonary에 ID를 이용해 동일하게O(1)로 SubView에서 StickerView를 찾아낼 수 있도록 하였습니다.어차피 해당
StickerView는 메모리에 존재하는 동안 같은 주소를 참조하고 있기에 추가적인 리소스가 들지 않는다고 생각했습니다.현재
StickerView삭제를 위해서는 아래와 같은 방식으로 작동합니다.StickerList를 파라미터로 받는다.StickerIdList를 생성해줍니다.🎨 스크린샷
🚀 테스트 방법