-
Notifications
You must be signed in to change notification settings - Fork 3
[Feature] 사진 오브젝트 추가 기능 완성 #92
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
Conversation
choijungp
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.
초스피드 띵똥 ! 이번 PR도 잘봤습니다 !!!
궁금한 것이 있는데요 ~ PHPicker에서 사진 1장 선택할 때에도 완료 버튼을 만들 수 있는지 궁금합니다 ~~
| private func convertSize(photoSize: CGSize) -> CGSize { | ||
| return .init() | ||
| } |
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.
이 메서드는 추후 사진 크기를 조정할 때 사용하나요 ??
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.
헉 사용하지 않는 메서드라 삭제해야합니다.!.! 날카로운 조이~
|
ekrud99
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.
고생했어유
어프루브~
| } | ||
|
|
||
| private func configureAttribute() { | ||
| imageView.contentMode = .scaleAspectFit |
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.
요녀석을 생성할 때 클로저에서 할지 이 메서드에서 할지는 자율로 할까유?
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.
죠습니다 🦈🦈🦈🦈🦈
eemdeeks
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.
고생 많으셨습니다!!
역시 속도가 장난 아니시군요..
| guard let tool else { return } | ||
| switch tool { | ||
| case .photo: | ||
| self?.presentImagePicker() | ||
| default: | ||
| break | ||
| } |
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.
이부분에서 하는 것과, selectedToolDelegate에서 해주는 것 중 어떤 것이 더 괜찮을까요??
해당 부분 말고 여기서 해주신 이유가 궁금합니다!!
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.
데이터의 흐름에 따라 처리하는게 적절하지 않을까 하여 위와 같이 처리했습니다. 제가 생각한 흐름은 다음과 같습니다!
Toobar에서 사용자의 action ->
delegate를 통해 VC에 알려줌 ->
VC가 ViewModel에게 선택한 tool을 알려줌 ->
ViewModel이 Usecase를 통해 선택한 tool에 대해 적절한 처리 ->
처리 결과를 VC에 알려줌 ->
VC는 받은 정보 (어떤 tool인지)에 따라 적절한 처리
| private var visibleCenterPoint: CGPoint { | ||
| let centerX = scrollView.contentOffset.x + (scrollView.bounds.width / 2) | ||
| let centerY = scrollView.contentOffset.y + (scrollView.bounds.height / 2) | ||
| return CGPoint(x: centerX, y: centerY) | ||
| } |
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.
화면 중앙을 알기 위해 연산 프로퍼티로 선언 해 주신 것이 인상깊습니다.
🌁 Background
📱 Screenshot
se3.mov
13.mini.mov
16pro.mov
👩💻 Contents
✅ Testing
📝 Review Note
사진 오브젝트 뷰 생성하기
200*200으로 제한하였습니다.scaleFactor를 설정하여 조절)WhiteObjectView의 서브클래스들은super.init(whiteboardObject: WhiteboardObject)을 통해 초기화합니다. 다만 사진 오브젝트 엔티티가 가지고 있는 size는 실제 사진의 가로, 세로 길이이기 때문에 해당 생성자로 생성이 불가능했습니다. 따라서 WhiteboardObject에 아래 생성자를 추가하고, 해당 생성자를 이용해 초기화하도록 구현했습니다.📣 Related Issue