Skip to content
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

[Team 14] 메인 탭에서 검색 바를 터치하면 여행지 추천 및 검색 화면으로 이동 #3

Merged
merged 33 commits into from
May 26, 2022

Conversation

BumgeunSong
Copy link

@BumgeunSong BumgeunSong commented May 25, 2022

Screenshot

홈 화면 추천 및 검색 화면 위치 권한 요청

작업 목록

  • Tuist를 사용해 프로젝트 파일 생성할 수 있도록 설정하고 프로젝트 파일을 git ignore함.
  • 메인 화면에 탭바와 네비게이션 바 컨트롤러를 설정.
  • 초기 뷰 컨트롤러 설정에 대한 테스트 케이스 추가
  • 메인 히어로 이미지 추가.
  • 처음 접속 시 위치 정보 권한 요청을 추가
  • 시간과 위치를 나타내는 기본 모델 추가
  • 추천 여행지 정보를 요청하면 dummy 데이터를 받을 수 있도록 구현
  • 검색바를 탭하면 검색 화면을 담당하는 ViewController로 이동하도록 구현

고민과 해결

📌 주변 여행지 추천을 하기 위해서는 초기 화면에서부터 위치가 필요합니다.

  • CLLocationManager를 이용하여 아예 초기에 위치 권한을 요청해서 받아오도록 했습니다.

📌 그러나 위치 업데이트를 너무 자주하지 않도록 만들 필요가 있었습니다.

  • 위치 업데이트를 할 때마다 주변 여행지와의 거리를 계산해야 합니다.
  • 위치는 대략적인 여행지와의 거리 추산을 위한 것이므로 위치의 정확도 타겟은 '수백미터 이내'로 설정했습니다.
  • 위치 업데이트를 너무 자주 하지 않게 만들었습니다.

📌 위치/장소를 표현하는 도메인 모델이 필요했습니다.

  • Core Location의 모델 구조 (CLPlaceMark -> CLLocation -> CLCoordinates) 를 비슷하게 참고하되, 현재 추천 기능에 필요한 정도로만 최소한도로 구현했습니다.
  • 향후 백엔드의 테이블 설계가 완료되고, 추가 기능이 생기면 프로퍼티에 변경이 있을 것 같습니다.

📌 백엔드가 완성되지 않았기에 가짜로 응답 데이터를 만들어야 했습니다.

  • HTTP 요청을 정의한 프로토콜을 만들고, 프로토콜의 구체 객체를 더미 데이터를 return하는 Stub으로 구현했습니다.
    Screen Shot 2022-05-25 at 1 07 04 PM

📌 NavigationController로 다음 화면으로 이동 후, 돌아왔을 때 전체가 비활성화 되는 문제가 있었습니다.

  • searchBar의 편집이 활성화 되었을때 다음 VC를 push 해주는 방식으로 작업하였는데 다시 pop 이 되었을때, 아무런 액션이 되지 않는 문제가 발생했습니다.
  • 처음에는 Storyboard와 코드드 UI작업한 부분이 달라서 발생하는 문제라고 생각했습니다.
  • 알고보니 searchBar의 edit 상태가 유지돼서 발생하는 문제였습니다.
  • push 후 endEdit(true) 설정을 해서 문제를 해결했습니다.

📌 searchBar가 navigationController item과 같이 보여져야하는데 아예 대체해버리는 문제가 있었습니다.

  • rootVC에서 navigationItem.titleView를 UISearchBar 로 지정을 해주었는데 이렇게 되면, 기본적인 navigation Item을 지워버리고, 다음 VC에서도 확인할 수 없습니다.
  • 알아보니 관련된 UISearchBarController가 있어서 이를 학습하고 적용할 계획입니다.

naneun and others added 25 commits May 23, 2022 11:03
[iOS] 처음 앱을 실행하면 홈 화면으로 들어가고 3개의 탭바를 볼 수 있음
�[iOS] ViewController가 여행지 추천을 요청하면 Dummy 데이터를 받을 수 있음
[iOS] 검색바를 터치하면 검색용 화면으로 이동할 수 있음 #6
@BumgeunSong BumgeunSong marked this pull request as ready for review May 25, 2022 07:23
@naneun naneun requested a review from GangWoon May 25, 2022 07:25
@naneun naneun added the review-FE New feature or request label May 25, 2022
@naneun naneun removed the review-FE New feature or request label May 25, 2022
amorfati0310 pushed a commit that referenced this pull request May 26, 2022
ocipap pushed a commit that referenced this pull request May 26, 2022
* Update issue templates

* PR template update

* Update README.md

* chore: readme 파일 수정

* env: 개발 환경 설정 구성(#3)

Co-authored-by: Hemudi <hemudi@users.noreply.github.com>

* chore: 불필요한 파일 삭제(#3)

Co-authored-by: Hemudi <hemudi@users.noreply.github.com>

Co-authored-by: Deok Yun Kim <59705184+dukcode@users.noreply.github.com>
Co-authored-by: dlwnstjrzz <95525638+dlwnstjrzz@users.noreply.github.com>
Co-authored-by: Hemudi <hemudi@users.noreply.github.com>
sabgilhun pushed a commit that referenced this pull request May 26, 2022
feat: 바텀 네비게이션 구현(#2)
sabgilhun pushed a commit that referenced this pull request May 26, 2022
[Android]  히데& 라이너스  스타일 테마 정의
choichoigang pushed a commit that referenced this pull request May 26, 2022
choichoigang pushed a commit that referenced this pull request May 26, 2022
choichoigang pushed a commit that referenced this pull request May 26, 2022
JasonLee0223 added a commit that referenced this pull request May 27, 2022
SearchViewController에서 SearchBar를 구현하도록 변경
JasonLee0223 added a commit that referenced this pull request May 27, 2022
SangHwi-Back added a commit that referenced this pull request May 27, 2022
[#2, #3, #4] feat: SPM 작업, TabBarController 에 NavigationController 연결 작업
SangHwi-Back pushed a commit that referenced this pull request May 27, 2022
[#3] fix: Tab 별 이미지와 색상을 요구사항에 맞게 수정
wnsxor1993 pushed a commit that referenced this pull request May 27, 2022
jminie-o8o added a commit that referenced this pull request May 27, 2022
junseokseo9306 pushed a commit that referenced this pull request May 27, 2022
edittext에 밑 줄을 없애기 위해 background를 transparent로 하게되면 커서가 사라지므로 따로 drawable로 생성
Dae-Hwa pushed a commit that referenced this pull request May 29, 2022
ocipap pushed a commit that referenced this pull request May 30, 2022
* Update issue templates

* PR template update

* Update README.md

* chore: readme 파일 수정

* env: 개발 환경 설정 구성(#3)

Co-authored-by: Hemudi <hemudi@users.noreply.github.com>

* chore: 불필요한 파일 삭제(#3)

Co-authored-by: Hemudi <hemudi@users.noreply.github.com>

* env: Typescript 절대경로 설정

Co-authored-by: jimmy neutron <dlwnstjrzz@users.noreply.github.com>

* Design: GlobalStyle, Default Theme 적용

Co-authored-by: jimmy neutron <dlwnstjrzz@users.noreply.github.com>

* feat: Icon 컴포넌트 구현 & hero img 업로드

Co-authored-by: jimmy neutron <dlwnstjrzz@users.noreply.github.com>

* feat: menubar 컴포넌트 구현

Co-authored-by: jimmy neutron <dlwnstjrzz@users.noreply.github.com>

* feat: loginMenu 컴포넌트 구현

Co-authored-by: jimmy neutron <dlwnstjrzz@users.noreply.github.com>

* feat: gnb 컴포넌트 구현

Co-authored-by: jimmy neutron <dlwnstjrzz@users.noreply.github.com>

* feat: SearchBarItem 컴포넌트 구현

* feat: searchBar 컴포넌트 구현

Co-authored-by: jimmy neutron <dlwnstjrzz@users.noreply.github.com>

* feat: header 컴포넌트 구현

Co-authored-by: jimmy neutron <dlwnstjrzz@users.noreply.github.com>

Co-authored-by: Deok Yun Kim <59705184+dukcode@users.noreply.github.com>
Co-authored-by: dlwnstjrzz <95525638+dlwnstjrzz@users.noreply.github.com>
Co-authored-by: Hemudi <hemudi@users.noreply.github.com>
Co-authored-by: jimmy neutron <dlwnstjrzz@users.noreply.github.com>
tmdgusya added a commit that referenced this pull request Jun 4, 2022
[Team-24][BE] airbnb 프로젝트 PR #3
CMSSKKK added a commit that referenced this pull request Jun 6, 2022
[team-14 BE] airbnb 프로젝트 2주차 1번째 PR 입니다. #3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review-iOS Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants