Post

Replies

Boosts

Views

Activity

Navigation Destination not working
I got the error: A NavigationLink is presenting a value of type “FormTemplate” but there is no matching navigationDestination declaration visible from the location of the link. The link cannot be activated. This problem is only occurring on iPhone, on iPad works fine. I was following the documentation, and can't find the error. That's my base tabbar view: TabView { ForEach(menuData, id: \.title) { item in NavigationStack { item.view } .tabItem { Text(item.title) Image(systemName: item.icon) } .tag(item.title) } } The menu view: ScrollView { VStack (spacing: 12) { ForEach(lstMenu, id: \.title) { tV in NavigationLink(destination: tv.view, tag: tv.title, selection: $selection) { rowView } } } .navigationTitle("Segurança") .padding(.top, 20) .padding(.trailing, 20) .padding(.leading, 20) } .navigationTitle("Segurança") The list view: List { ForEach($viewModel. forms), id: \.documentId) { form in NavigationLink(value: form) { NameContentRow(entity: form) .frame(height: 75) .contentShape(Rectangle()) } } } .navigationDestination(for: FormTemplate.self) { form in EventFormResponseList(form: form) .vlPermissions(permissions) } .refreshable { fetch(onPullToRefresh: true) } .listStyle(.insetGrouped) .navigationBarTitleDisplayMode(.inline) .navigationBarTitle("Formulários de eventos") .padding(.horizontal, sizeClass == .compact ? 0 : 20) .padding(.top, sizeClass == .compact ? 0 : 16) .task { viewModel.loadFormTemplate(completion: { _ in }) }
0
1
1.5k
Nov ’22
Stored property 'base' of 'Sendable'-conforming struct 'AnyShape' has non-sendable type '(CGRect) -> Path'; this is an error in the Swift 6 language mode
Since I updated my project I'm getting this error Stored property 'base' of 'Sendable'-conforming struct 'AnyShape' has non-sendable type '(CGRect) -> Path'; this is an error in the Swift 6 language mode I get this error at that struct, more specifically on the base variable public struct AnyShape: Shape { private var base: (CGRect) -> Path public init<S: Shape>(shape: S) { base = shape.path(in:) } public func path(in rect: CGRect) -> Path { base(rect) } } I have no idea how to solve this issue, I've been looking on the internet for same issues and get nothing yet
1
0
428
Sep ’24