swiftui notification tap: how to open a specific screen

In my applicatioin written in swiftui i have successfully added notifications. I want to open a specific view when user taps on the notification. With UIKit we can use Storyboard identifier to navigate to a specific viewcontroller. How to do the same scenario with SwiftUI.

Replies

Did you try using a NavigationView and a NavigationLink?


have a look here:

https://stackoverflow.com/questions/56437335/go-to-a-new-view-using-swiftui


Note: this question should better be on SwiftUI section of the forum.

  • @Claude31 I guess he is referring to opening a particular view when notification is clicked and not the navigationView or navLink. I have a similar issue. @DilipRam could you let me know if this was solved and what did you do.

Add a Comment