I’m currently writing the code with swiftui, but I made the Home.swift file.
If you touch the button below, I know that NavigationLink exists as a way to go to the Home.swift file, but I don’t know how to use it, so I’m asking you a question.
There’s no need for screen change animations
Below is part of the code
struct CustomTabs : View {
@Binding var index : Int
@Binding var circlePosition : CGFloat
var body : some View{
HStack(spacing: 0) {
Button(action: {
print("홈으로")
self.index = 0
}) {
VStack(alignment: .center, spacing: 4) {
Image(self.index == 0 ? "home_1" : "home")
Text("홈")
.font(self.index == 0 ? Font.custom("SUITE-Medium", size: 11) : Font.custom("SUITE-Light", size: 11))
}
}
.foregroundColor(self.index == 0 ? Color(hex: 0x00ab84) : Color(hex: 0x545860))
.offset(x: 4)
}
}
I looked up books and tried Googling, but it still hasn’t been solved