Skip to content
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

[Style] 네비게이션 로직 추가 및 칩 네비게이션 추가 #57

Open
wants to merge 4 commits into
base: juri
Choose a base branch
from

Conversation

hooni0918
Copy link
Collaborator

🔗 연결된 이슈

📄 작업 내용

  • 네비게이션 로직 추가
  • 네비게이션 UI 수정
구현 내용 IPhone 15 pro IPhone SE
GIF

💻 주요 코드 설명

SearchView는 깡통입니다 무시해주세요

ContentView

  • �홈 화면에 네비에이션 로직 추가해두었습니다.
struct ContentView: View {
    @StateObject private var navigationManager = NavigationManager()
    
    var body: some View {
        TabView(selection: $navigationManager.selectedTab) {
            NavigationStack(path: $navigationManager.mapPath) {
                Home()
                    .navigationDestination(for: ViewType.self) { viewType in
                        navigationManager.build(viewType)
                    }
            }
        }
        .environmentObject(navigationManager)
    }
}

Comment on lines +24 to +26
onSearchSubmit: {
navigationManager.push(.searchView)
},
Copy link
Member

Choose a reason for hiding this comment

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

push 할때 TabView 히든 처리 해야 할거 같아여!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

수정햇습니다

@thingineeer thingineeer added style UI개발시 사용 Jihoon 나는지훈 labels Jan 15, 2025
Copy link
Collaborator

@ChoiAnYong ChoiAnYong left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!

}
}

func push(_ view: ViewType) {
switch selectedTab {
case .map:
if view == .searchView {
isTabBarVisible = false
Copy link
Member

Choose a reason for hiding this comment

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

isTabBarVisible에 따라서 탭뷰가 없어지는 로직이 어딨나용

        .toolbar(.hidden, for: .tabBar) 으로 제어
Copy link
Member

@thingineeer thingineeer left a comment

Choose a reason for hiding this comment

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

음 .. 굿 입니다.

Copy link
Collaborator

@juri123123 juri123123 left a comment

Choose a reason for hiding this comment

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

깔끔ㅋㅋ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Jihoon 나는지훈 style UI개발시 사용
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Style] 상단 네비게이션 부착
4 participants