Skip to content

Today.Storayboard 구현(1) - #20

Merged
365kim merged 2 commits into
masterfrom
feature/today
Apr 28, 2020
Merged

365kim merged 2 commits into
masterfrom
feature/today

Conversation

@365kim

@365kim 365kim commented Apr 27, 2020 •

Copy link
Copy Markdown
Member

Today.Storayboard 구현 (#10) 관련
금일 작업분 코드리뷰 요청드립니다

0. 추가한 객체

  • labelDate : 오늘날짜 표시
  • textViewAnswer : 답변 작성할 칸
  • labelPlaceHolder : 답변 작성할 칸에 띄워둘 placeholder(hint)

1. 작성날짜(오늘날짜) 표시하기

  • Date() 로 현재날짜를 가져옴
  • DateFormatter()로 "yyyy년 MM월 dd일" 형태로 표시

2. placeholder 만들기

  • textView는 placeholder를 따로 구현해야해서 별도로 label 생성 labelPlaceHolder
  • isEmpty와 isHidden을 이용하여 작성한 내용이 없으면 답변작성가이드 띄우고 작성한 내용이 있으면 답변작성가이드 없앰

3. 답변작성 텍스트뷰 외 누르면 키보드 띄우기

  • textView 터치 시 자동으로 팝업
  • 만약 뜨지 않는다면 시뮬레이터 - Hardware - Keyboard - Toggle Software Keyboard

4. 텍스트뷰 외 터치 시 키보드 감추기

  • override func touchesBegan()로 구현

5. 기타

  • placeholder, textview 폰트사이즈 : 16pt로 설정함 (필요시 변경)
  • textview 테두리 적용, 모서리 둥글게 변경함
  • 시뮬레이터 녹화하는 방법 📷
    • 터미널에 입력 xcrun simctl io booted recordVideo ~/simulator.mov
    • 구글에 입력 convert mov to gif

@365kim
365kim requested a review from dev-jko April 27, 2020 11:07
@365kim 365kim self-assigned this Apr 27, 2020

@dev-jko dev-jko left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰를 코멘트로 잘못 올려서 아래에 다시 올렸어요~

@dev-jko dev-jko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OneDayOneAnswer/OneDayOneAnswer/TodayViewController.swift 에서
32번~36번 줄을 textViewAnswer를 불러오는 메서드로 묶는건 어떨까요?
지금은 텍스트뷰 하나지만 다른 요소들이 추가되면 viewDidLoad 메서드가 너무 복잡할 것 같아서요

@365kim

365kim commented Apr 27, 2020

Copy link
Copy Markdown
Member Author

좋은 의견 감사합니다
말씀해주신 대로 textViewAnswer의 테두리, 여백 등 설정해주는 라인을 setTextView() 로 묶어서 작성했더니 viewDidLoad 메서드의 코드가 한결 간결해진 것 같습니다

@365kim
365kim requested a review from dev-jko April 27, 2020 13:27

@dev-jko dev-jko left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정 확인했습니다!

@365kim
365kim merged commit 3317e04 into master Apr 28, 2020
@365kim
365kim deleted the feature/today branch April 28, 2020 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants