title: Create common layout for Navigation Bar in SwiftUI So other SwiftUI views should reuse same Nav Bar
body: <p>In iOS SwiftUI, How we can make a common layout for Navigation Bar. So we can use that in all project without re-write the same code.</p>
  <p><a href="https://i.stack.imgur.com/MF5gB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MF5gB.png" alt="enter image description here" /></a></p>
  <p>We can use ViewBuilder to create base view for common code as follows:</p>
  <pre><code>struct BaseView&lt;Content: View&gt;: View {
  let content: Content
  init(@ViewBuilder content: () -&gt; Content) {
      self.content = content()
  }
  var body: some View {
      // To-do: The most important part will go here
    }
  }
  </code></pre>
  <p>How we can add Navigation bar Code in View Builder or Base view?</p>