-
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
[숲] 6주차 실습 #20
base: main
Are you sure you want to change the base?
[숲] 6주차 실습 #20
Conversation
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.
수고하셨습니다😊 코드리뷰 확인해주세요!!
memoTableView.dataSource = self | ||
memoTableView.delegate = self | ||
setNavigationBar() | ||
|
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.
view.backgroundColor = .white
사용해주세요!
var titleArray: [String] = [] | ||
var contentArray: [String] = [] |
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.
Memo 구조체를 만들어서 한꺼번에 관리하는 걸 추천드려요!
struct Memo {
var title: String
var content: String
}
이런식으로요!
if (titleText.textColor == .lightGray || contentText.textColor == .gray || titleText.text.isEmpty || contentText.text.isEmpty) { | ||
print("잘못된 제목 또는 내용입니다.") | ||
return | ||
} |
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.
내용이 입력되지 않았을 때의 분기처리 하신 거 너무 좋습니다!!
그런데 로그만 띄우면 사용자는 알 수 없으니까
- 내용이 입력되지 않았을 때 '작성하기' 버튼 비활성화 하고 입력됐을 때 활성화 시키기
- 내용이 입력되지 않았을 때 '작성하기' 버튼 클릭하면 '제목 or 내용을 입력하세요' alert 띄우기
와 같은 코드를 구현하면 더 좋을 것 같아요!
make.leading.equalToSuperview().inset(50) | ||
make.trailing.equalToSuperview().inset(50) |
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.
make.leading.trailing.equalToSuperview().inset(50)
한 줄로 작성할 수 있습니다!
if isModified == true { | ||
_ = self.navigationController?.popViewController(animated: false) |
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.
수정이 됐을 때 바로 홈으로 이동하는 것보다는
이전 뷰인 메모 상세 뷰로 이동하는 게 더 자연스러울 것 같아요!
📌 관련 이슈
#17
✨ 이슈 내용
메모장
📸 스크린샷(선택)
📚 레퍼런스 (또는 새로 알게 된 내용) 혹은 궁금한 사항들