feat(main): 하단 탭 순서 변경
This commit is contained in:
@@ -40,31 +40,6 @@ struct BottomTabView: View {
|
|||||||
width: tabWidth
|
width: tabWidth
|
||||||
)
|
)
|
||||||
|
|
||||||
TabButton(
|
|
||||||
title: "채팅",
|
|
||||||
action: {
|
|
||||||
if currentTab != .chat {
|
|
||||||
currentTab = .chat
|
|
||||||
}
|
|
||||||
},
|
|
||||||
image: {
|
|
||||||
currentTab == .chat ?
|
|
||||||
"ic_chat_selected" :
|
|
||||||
"ic_chat"
|
|
||||||
},
|
|
||||||
fontName: {
|
|
||||||
currentTab == .chat ?
|
|
||||||
Font.bold.rawValue :
|
|
||||||
Font.medium.rawValue
|
|
||||||
},
|
|
||||||
color: {
|
|
||||||
currentTab == .chat ?
|
|
||||||
Color.button :
|
|
||||||
Color.graybb
|
|
||||||
},
|
|
||||||
width: tabWidth
|
|
||||||
)
|
|
||||||
|
|
||||||
TabButton(
|
TabButton(
|
||||||
title: "라이브",
|
title: "라이브",
|
||||||
action: {
|
action: {
|
||||||
@@ -90,6 +65,31 @@ struct BottomTabView: View {
|
|||||||
width: tabWidth
|
width: tabWidth
|
||||||
)
|
)
|
||||||
|
|
||||||
|
TabButton(
|
||||||
|
title: "채팅",
|
||||||
|
action: {
|
||||||
|
if currentTab != .chat {
|
||||||
|
currentTab = .chat
|
||||||
|
}
|
||||||
|
},
|
||||||
|
image: {
|
||||||
|
currentTab == .chat ?
|
||||||
|
"ic_chat_selected" :
|
||||||
|
"ic_chat"
|
||||||
|
},
|
||||||
|
fontName: {
|
||||||
|
currentTab == .chat ?
|
||||||
|
Font.bold.rawValue :
|
||||||
|
Font.medium.rawValue
|
||||||
|
},
|
||||||
|
color: {
|
||||||
|
currentTab == .chat ?
|
||||||
|
Color.button :
|
||||||
|
Color.graybb
|
||||||
|
},
|
||||||
|
width: tabWidth
|
||||||
|
)
|
||||||
|
|
||||||
TabButton(
|
TabButton(
|
||||||
title: "마이",
|
title: "마이",
|
||||||
action: {
|
action: {
|
||||||
|
|||||||
@@ -33,14 +33,14 @@ struct HomeView: View {
|
|||||||
.frame(width: viewModel.currentTab == .home ? proxy.size.width : 0)
|
.frame(width: viewModel.currentTab == .home ? proxy.size.width : 0)
|
||||||
.opacity(viewModel.currentTab == .home ? 1.0 : 0.01)
|
.opacity(viewModel.currentTab == .home ? 1.0 : 0.01)
|
||||||
|
|
||||||
chatTabView
|
|
||||||
.frame(width: viewModel.currentTab == .chat ? proxy.size.width : 0)
|
|
||||||
.opacity(viewModel.currentTab == .chat ? 1.0 : 0.01)
|
|
||||||
|
|
||||||
liveView
|
liveView
|
||||||
.frame(width: viewModel.currentTab == .live ? proxy.size.width : 0)
|
.frame(width: viewModel.currentTab == .live ? proxy.size.width : 0)
|
||||||
.opacity(viewModel.currentTab == .live ? 1.0 : 0.01)
|
.opacity(viewModel.currentTab == .live ? 1.0 : 0.01)
|
||||||
|
|
||||||
|
chatTabView
|
||||||
|
.frame(width: viewModel.currentTab == .chat ? proxy.size.width : 0)
|
||||||
|
.opacity(viewModel.currentTab == .chat ? 1.0 : 0.01)
|
||||||
|
|
||||||
if viewModel.currentTab == .mypage {
|
if viewModel.currentTab == .mypage {
|
||||||
MyPageView()
|
MyPageView()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user