I have a customtab bar that I've implemented through a tutorial. Below is the HStack for this custom bar.
struct CustomTabBar: View {
@Binding var selectedTab: String
@State var isLinkActive = true
// Storiing Each Tab Midpointts to animate it in future...
@State var tabPoints: [CGFloat] = []
var body: some View {
HStack(spacing: 0){
// Tab Bar Buttons....
TabBarButton(image: "house", selectedTab: $selectedTab, tabPoints: $tabPoints)
.background(
NavigationLink("",destination: QuickTing())
)
TabBarButton(image: "person", selectedTab: $selectedTab, tabPoints: $tabPoints)
TabBarButton(image: "gearshape", selectedTab: $selectedTab, tabPoints: $tabPoints)
}
.padding()
.background(LinearGradient(gradient: Gradient(colors: [Color.orange, Color.pink]), startPoint: .bottomLeading, endPoint: .topTrailing).clipShape(TabCurve(tabPoint: getCurvePoint() - 15))
)
.overlay(
Circle()
.fill(Color.pink)
.frame(width: 10, height: 10)
.offset(x: getCurvePoint() - 20)
,alignment: .bottomLeading
)
.cornerRadius(35)
.padding(.horizontal)
}
Whenever I put in the navigationLink it doesn't push the view that i'd like. Even when using the emptyview() fix I receive this error.
Could anyone point as to why I get this error as well as how Implement a navigationLink without compromising on the design of the CustomTabBar.