DEV Community

Saurabh Chavan
Saurabh Chavan

Posted on

Go from one screen to another in SwiftUI

In this post we will be explore how can we navigate from one screen to another using the NavigationLink

import SwiftUI

struct ContentView: View {
    var body: some View {
        NavigationView {
            List(1..<30){ row in
                    Text("Details \(row)")
                } label: {
                    Text("Row \(row)")


struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
Enter fullscreen mode Exit fullscreen mode


Image description

Top comments (0)