-
Notifications
You must be signed in to change notification settings - Fork 37
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
[Team10 - 쑤, Zeke] Issue, Label, Milestone View 구현 #16
Conversation
[iOS] change build target
[iOS] LoginView
Conflicts: iOS/issue-tracker/issue-tracker.xcodeproj/project.pbxproj
[iOS] Tab Bar Controller
상황에 맞게 테이블뷰 잘 쓰신것 같아요. 고민되시면 HIG 중에 Tables 와 Collections를 읽고 비교해보시는 것도 좋을 것 같아요 ~ |
이건 좀 더 고민해보시고 혼자만의 힘으로 구현하는 것을 추천드립니다. 힘든 것을 오롯이 혼자 힘으로 구현해보는 것이 다른 기능을 더 많이 구현하는 것보다 100배 더 가치가 있다고 생각합니다. 작년 멤버중에도 이 동적 높이를 구현한 친구가 한명으로 유일했습니다. 그 친구는 iOS-generic 채널에 문의도 하며 결국 구현하더라구요. 그 친구처럼 한번 구현해보시길 권합니다. 궁금한 점은 iOS-generic 채널에 문의해보세요. 해보고 모르시겠으면 그 친구 블로그를 알려드릴게요. 그럼 화이팅! |
SwiftLint도 추가는 하셨지만 적용은 안하셨네요! 적용 부탁드립니다 ㅎㅎ |
공용으로 사용될 버튼 컴포넌트들을 어떻게 사용할 수 있을까 고민됨, 머티리얼 ui에 startIcon이라는 prop이 있던데 그것을 사용할까 말까 고민됨.
[FE] 아이콘, 버튼 추가 LoginPage 짧게 구현 #16
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.
넵, 고생하셨습니다.
리뷰드렸는데 확인 부탁드릴게요~! 🙏
class LabelsCollectionViewCell: UICollectionViewCell { | ||
static var identifiers = "LabelsCollectionViewCell" | ||
|
||
let label: PaddingLabel = { |
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 으로 둘 수 있지 않을까요? 빠르게 개발하시더라도 private 을 둬야하는지 고민하는 것은 습관을 들이셔야 합니다 ㅎㅎ
이 부분 말고도 외부에서 접근안하는 변수나 메소드는 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.
다음 PR에 적용시키도록 하겠습니다!👍
import SnapKit | ||
|
||
class LabelsCollectionViewCell: UICollectionViewCell { | ||
static var identifiers = "LabelsCollectionViewCell" |
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.
이 부분 protocol를 만들어서 적용하는 방법도 있습니다.
찾아보시고 괜찮으면 protocol 만들어서 사용하시는 것도 좋을 것 같아요 👍
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
addSubview(label) | ||
setAutolayout() |
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.
set은 java beans의 get set 메소드와 이름이 겹쳐서, 보통 설정(or 구성)하는 함수 네이밍으로 잘 쓰이는 setup
이나 configure
가 더 적절한 것 같습니다.
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.
setup으로 수정했습니다.😊
|
||
func setCheckMode(count: Int) { | ||
checkBoxBarButtonItem.image = UIImage(systemName: "checkmark.circle") | ||
labelBarButtonItem.title = "\(count)개의 이슈가 선택됨" |
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.
이렇게 "\(count)개의 이슈가 선택됨"
처럼 String 값을 만드는 것은 뷰가 아닌 프레젠터(ex. ViewModel, Presenter)의 역할입니다).
Mode -> Presenter -> View
이렇게 프레젠터 단을 만들면 뷰와의 의존성 없이 테스트 가능합니다.
MVVM 패턴을 사용하신다고 하여 말씀드립니다 ㅎㅎ
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.
cell에 표시하기 위한 값을 ViewModel이 처리하도록 변경해보겠습니다. 다만, Rx를 활용해서 로직을 좀더 보완해야 할 것 같아서 우선 해당 메서드는 삭제하고 다음 리뷰에 포함시키겠습니다.😊
return textField | ||
}() | ||
|
||
private lazy var toolbar: UIToolbar = { |
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 선언으로 먼저 frame 방식으로 init 하고 이후에 autolayout을 적용하고 있네요!
한 가지만 해서 뷰를 구성할 수 있지 않을까요??
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.
- toolbar를 frame으로 init을 한 이유는, toolbar의 frame 값을 지정하지 않으면 autolayout break warning이 뜨기 때문입니다.ㅠㅠ(원인을 전혀 모르겠습니다)
- lazy var로 view를 생성하던 것을 lazy를 사용하지 않도록 수정했습니다.😊
cell.textLabel?.text = "완료일" | ||
return cell | ||
default: | ||
fatalError() |
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.
fatalError는 크래시로 앱에 매우 치명적입니다.
출시전에 확인해보시려는 목적이라면 assert를 추천드립니다.
어떻게 다른지 아래 글 추천드립니다
https://www.vadimbulavin.com/assert-vs-precondition-vs-fatalerror/
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.
fatalError() 대신 required init 구현부를 작성하도록 수정했습니다.😊
|
||
override func viewDidLayoutSubviews() { | ||
super.viewDidLayoutSubviews() | ||
tableView.frame = view.bounds |
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.
동적으로 할당할 필요가 없으므로 변경했습니다.😊
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.
다른 viewDidLayoutSubviews
에도 동적으로 할당할 필요가 없는 코드가 있는 것 같은데
왜 viewDidLayoutSubviews
를 자주 쓰셨는지 궁금합니다(정말 궁금해서 말씀드리는거에요 ㅎㅎ 동적으로 대응해야 하는 상황이 있는건가요?). 🧐
@ehgud0670 |
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.
네 반영하신 부분 모두 확인했습니다 😃
코멘트 하나 달았는데 답변만 부탁드립니다.
고생하셨습니다, 그럼 다음 스텝도 화이팅하시기 바랍니다. 💪
|
||
override func viewDidLayoutSubviews() { | ||
super.viewDidLayoutSubviews() | ||
tableView.frame = view.bounds |
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.
다른 viewDidLayoutSubviews
에도 동적으로 할당할 필요가 없는 코드가 있는 것 같은데
왜 viewDidLayoutSubviews
를 자주 쓰셨는지 궁금합니다(정말 궁금해서 말씀드리는거에요 ㅎㅎ 동적으로 대응해야 하는 상황이 있는건가요?). 🧐
frame을 지정하는 view의 layout과 관련된 작업은 |
넵, 저도 사실 |
작업 목록
고민한 것과 해결하지 못한 것
@ehgud0670
안녕하세요. 제이슨!
아직 구현하는 단계여서 코드 형식을 포함해 미흡한 부분이 많은 부분 감안하여 리뷰를 부탁드리겠습니다.
감사합니다.😊