-
Notifications
You must be signed in to change notification settings - Fork 1
[FEAT] 장소 등록 프로세스 뼈대 구현 (페이징, BaseVC) (#227) #228
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
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.
진짜 최고 !!!!!! 💗🥑 잘 쓰겠습니당
PR 컨벤션만 바꿔줘잉 ~~
| 155D45B02E26B2E3008C0316 /* SpotUploadSearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpotUploadSearchViewController.swift; sourceTree = "<group>"; }; | ||
| 155D45B22E26B8CB008C0316 /* BaseUploadInquiryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseUploadInquiryView.swift; sourceTree = "<group>"; }; | ||
| 155D45B52E26BB5F008C0316 /* RequirementType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RequirementType.swift; sourceTree = "<group>"; }; | ||
| 155D45B72E26CCBC008C0316 /* BaseUploadInquiryViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseUploadInquiryViewController.swift; sourceTree = "<group>"; }; |
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.
🐿️🐿️
SpotUpload > View 그룹 안에 Base 그룹 하나 더 만들어서 폴더링 하는 거 어떨까요?! 뷰랑 뷰컨이 엄청 많을 것 같아서, Base라도 분리하면 좋을 것 같아요!
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.
SpotUpload / BaseUploadInquiry / Pages 이렇게 폴더링하는 건 어떨까요 👀
| viewModel.isPreviousButtonEnabled.value = true | ||
|
|
||
| if viewModel.spotType != nil { | ||
| viewModel.isNextButtonEnabled.value = true | ||
| } else { | ||
| viewModel.isNextButtonEnabled.value = 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.
🐿️🐿️
이거 BaseUploadInquiryVC으로 빼면 좋을 것 같아요! previousButton은 init에서 값 받고, nextButton도 바인딩 주체를 init에서 받으면 setStyle에서 제어할 수 있지 않을까 싶네요
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.
좋은 방향 제안해주셔서 감사합니다!!
그런데 init에서 바인딩하자니, 너무 무거워지는 느낌이라 연산 프로퍼티를 오버라이딩 하는 방식으로 수정해봤습니다!
BaseUploadInquiryVC에 canGoPrevious, canGoNext 연산프로퍼티와 updateButtonState 메소드를 추가했고
var canGoPrevious: Bool { true }
var canGoNext: Bool { false }
func updateButtonStates() {
viewModel.isPreviousButtonEnabled.value = canGoPrevious
viewModel.isNextButtonEnabled.value = canGoNext
}ChildVC에서 canGoPrevious, canGoNext 를 오버라이딩하여 viewModel.spotType != nil 등과 같은 판단 로직을 넣는 방향으로 수정했습니다!
🐿️ Pull Requests
🪵 작업 브랜치
🥔 작업 내용
장소 등록 프로세스 뼈대를 구현해봤습니다. 혹시 더 좋은 구조 아이디어가 있다면 말씀해주세요!
페이지를 만들 때 BaseUploadInquiryVC를 상속받으면 됩니다.
contentViews프로퍼티를 오버라이딩하여 UI 프로퍼티 배열을 넣으면 자동으로 노란색 contentView에 addSubView 됩니다.spotUploadInquiryView.contentView.addSubviews(...)를 반복하는 게 길고 번거로워서 이렇게 오버라이딩 프로퍼티로 만들었습니다.참고:
SpotUploadSearchViewController,SpotTypeSelectionViewController🚨 참고 사항
뒤로가기 버튼에서 borderGlassmorphismType을 설정하면 아래 사진처럼 버튼이 네모낳게 이상해지는 이슈가 있습니다..
탈퇴 뷰 모달 코드랑 똑같이 해봐도 그러네요... 추후 디버깅해보겠습니다. 일단은 일반 glassmorphismType으로 설정해뒀어요
문제코드:
let previousButton = ACButton(style: GlassButton(borderGlassmorphismType: .buttonGlassDefault, buttonType: .line_22_b1SB), title: StringLiterals.SpotUpload.goPrevious)📸 스크린샷
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-07-16.at.05.22.53.mp4
💥 To be sure
🌰 Resolve issue