[Beck] Step5 - Touch and Drag 1 - #109
Open
SangHwi-Back wants to merge 7 commits into
Open
Conversation
Rectangle이 슈퍼 클래스가 되고, 하위 클래스가 MainScreenViewController에 사용되면서 뷰 컨트롤러가 모든 뷰 타입을 관리하게 될 것을 우려해 팩토리 클래스가 Rectangle 생성을 관리하도록 하였습니다.
스텝5에서 진행해야할 사항을 미리 README에 정의해 두고 스텝 시작합니다.
선택된 뷰가 두 손가락으로 움직이게 될 수 있도록 기능을 업데이트 하였습니다.
필요없는 소스를 제거하고, setCopiedView(rect:)에서 nil 도 반영하도록 하였습니다.
두 손가락으로 탭을 계속 하면 임시로 넣어두는 뷰가 사라지지 않는 오류가 있어서 touchesEnded(_:,with:) 메소드를 사용하였습니다. 그 외에도 필요하지 않은 소스를 정리하였습니다.
PR 이전에 제스쳐 관련 설명을 위해 코멘트를 추가하였습니다.
- 사각형의 이동 범위를 한정하여, 버튼이나 슬라이더 영역을 침범하지 않도록 합니다. - 사각형의 선택 상태가 중복되지 않도록 합니다. - 임시 뷰가 4픽셀 이상 Pan gesture로 이동하지 않으면 움직이지 않은것으로 인식합니다.
Author
|
안녕하십니까 JK. PR 메시지에서 언급드렸던 '드래그 할 수 있는 최대영역'을 한정하는 작업과 더불어, 오류를 발생시킬 수 있는 부분에 대한 추가 수정작업을 진행하였습니다. 확인 가능하신 때에 리뷰 부탁드리겠습니다. 감사합니다! 🙇♂️ |
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
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.
자세한 디버깅 이전에 PR을 보내는 점 양해 부탁드립니다.
원래라면 디버깅이 완료된 이후에 완벽히 작동한다는 확신이 생기면 PR을 요청드렸겠지만, 이대로는 아래의 이유로 인해 학습에 지장이 될까봐 미리 PR을 보내게 된 점 양해 부탁드립니다.
현재 기능작동은 모두 잘 진행되고 있으나, 추가 작업을 진행할 부분은 다음과 같습니다.
작업 목록
기능 구현 방법
Rectangle은 선택이 된 상태가 되면, 두 손가락을 이용해 임시 뷰가 될 수 있습니다. 그리고 팬 제스쳐도 추가하여 드래그도 가능하게 합니다.
두 손가락을 이용한 제스쳐가 실행되면, UIGestureRecognizerDelegate 메소드를 이용해 Rectangle이 임시뷰가 되고, 복사된 뷰는 Rectangle의 밑에 추가합니다.
팬 제스쳐로 드래그를 한 뒤 드래그가 끝나면 기존의 Rectangle은 사라지고, 복사된 뷰가 Rectangle을 대신합니다.