-
Notifications
You must be signed in to change notification settings - Fork 0
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
Map Search 화면 구현 #23
Map Search 화면 구현 #23
Conversation
- 기존에는 textField로 구현했었으나, 실제로 보여주기만 하기 때문에 UIView로 커스텀
- view model에 action에 함수 추가 후, 해당 함수를 호출하는 함수 구현 - 이벤트 발생 시, 해당 함수 호출 - DI에 vc, usecase, view model 생성 함수 추가 - Coordinator에 toMapSearch 함수 구현
- 홈에서 이미지 로딩이 오래 걸려서 이미지 캐싱 구현 전까지는 주석 처리
- compositional layout 적용 - 샘플 데이터로 부터 응답받은 최신 검색 키워드를 collection view에 표시하도록 구현 - 네비 바 디자인은 추후에 진행할 예정
- base collection view cell 구현
- entity, use case response type, repository - use case interface와 repository interface를 나누기로 했었는데 추후에 할 예정
lazy var textLabel: UILabel = { | ||
let label = UILabel() | ||
label.text = "검색어를 입력하세요" | ||
label.font = UIFont.ngaSubTitle2R | ||
label.textAlignment = .center | ||
label.textColor = NagazaAsset.Colors.gray4.color | ||
return label | ||
}() | ||
|
||
lazy var searchImageView: UIImageView = { | ||
let imageView = UIImageView() | ||
imageView.image = NagazaAsset.Images.imgSearch.image | ||
return imageView | ||
}() |
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.
lazy로 선언하신 이유가 궁금합니다.
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
는 깜박하신거죵?! ㅋㅋ
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.
lazy 키워드를 쓰는 이유른 해당 객체에 접근했을 때 메모리에 올라가서 lazy를 쓰는게 더 효율적이라고 판단했습니다
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 키워드는 까먹었네요
수정하겠습니다
위 데이터는 단순 String 데이터이면서, 기기에 종속되도 크게 문제없는 데이터라고 생각해서 UserDefaults만으로도 충분할것같습니다. 최근검색 데이터도 최대 개수 제한 및 최신데이터가 상위에 있고 검색결과에 클릭한 제목 결과를 최근검색 데이터에 저장하는 방식은 어떨까요? |
저도 최근 검색은 앱에 내장해도 된다고 생각해서 내장 db를 쓸까 생각중입니다. |
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으로 설정
Motivation ⍰
Key Changes 🔑
구현 미리보기는 다음과 같습니다.
compositional layout 적용했고 최근 검색은 API 연동해서 샘플 데이터를 응답받아서 collection view에 표시하도록 구현했습니다.
이 부분은 내장 DB를 사용할 지 서버를 연동할 지 몰라서 일단은 API 연동하는 방식으로 구현했습니다.
네비 바 디자인은 추후에 진행할 예정입니다.
use case interface와 repository interface를 나누기로 했었는데 추후에 리팩토링하겠습니다.
To Reviewers 🙏🏻
Linked Issue 🔗