-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feat [#5] 커스텀 네비게이션바 제작 #11
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.
👍 사실 Custom Modifier의 구현을 처음 봐서 너무 신기합니다! 수고 많으셨습니당~
if showBackButton { | ||
Button(action: { | ||
dismiss() | ||
}) { | ||
Image(.chevronLeft) | ||
.resizable() | ||
.scaledToFit() | ||
.frame(width: 20,height: 20) | ||
} | ||
.padding(EdgeInsets(top: 0, leading: 14, bottom: 0, trailing: 8)) | ||
} else { | ||
Image(.chevronLeft).hidden() | ||
.padding(EdgeInsets(top: 0, leading: 14, bottom: 0, trailing: 0)) | ||
} |
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 func OnboardingTitleView() -> some View {}
와 같이 하위에 빼주고 body를 간결하게 해보는 것, 좋을 수 있을 것 같기도합니다
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.
c19cf89 여기서 반영했습니다!
이 부분은 뷰 모델로 빼는 게 맞는 것 같은데, 조금 고민되는 부분이 있어서 추후에 리팩토링하며 코드 개선해보겠습니다
c53628a
to
3473ff4
Compare
👾 작업 내용
커스텀 네비게이션 바를 제작했습니다.
🚀 PR Point
ViewModifier를 이용하여 CustomNavigationBar를 재사용했습니다.
네비게이션 바를 적용할 때 아래와 같이 추가해주세요.
📸 스크린샷
✅ CheckList
🔗 Issue
Resolved #5