Relative Content

Tag Archive for iosswiftswiftuiswiftui-navigationstack

Navigation link cannot be activated

I am working on combining two feeds in the same view. They are held inside a ZStack enclosed by a NavigationStack. The issue arises when clicking on the tab bar item to navigate to the message view, which works fine. However, when coming back and clicking on a NavigationLink to navigate to a user profile page, this results in issues:

SWIFT UI Navigation Stack: Navigation link cannot be activated

I am working on combining two feeds in the same view. They are held inside a ZStack enclosed by a NavigationStack. The issue arises when clicking on the tab bar item to navigate to the message view, which works fine. However, when coming back and clicking on a NavigationLink to navigate to a user profile page, this results in issues:

Get SwiftUI preview to work with NavigationStack

I’ve abstracted my navigation into a service for my SwiftUI app. When I run it on the simulator or physical device it works perfectly. However, when testing in the #Preview, the navigation doesn’t seem to work.