<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>NavigationView Archives - AppMakers.Dev</title>
	<atom:link href="https://appmakers.dev/tag/navigationview/feed/" rel="self" type="application/rss+xml" />
	<link>https://appmakers.dev/tag/navigationview/</link>
	<description>SwiftUI Tutorials, iOS App Development, SwiftUI, Swift</description>
	<lastBuildDate>Wed, 30 Oct 2024 14:41:21 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://appmakers.dev/wp-content/uploads/2024/10/cropped-AppMakersDev-32x32.jpg</url>
	<title>NavigationView Archives - AppMakers.Dev</title>
	<link>https://appmakers.dev/tag/navigationview/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>NavigationView &#8211; SwiftUI</title>
		<link>https://appmakers.dev/navigationview-swiftui/</link>
		
		<dc:creator><![CDATA[AppMakers]]></dc:creator>
		<pubDate>Thu, 05 Mar 2020 18:33:59 +0000</pubDate>
				<category><![CDATA[Export Locked]]></category>
		<category><![CDATA[iOS Development]]></category>
		<category><![CDATA[Swift]]></category>
		<category><![CDATA[Swift Tutorials]]></category>
		<category><![CDATA[SwiftUI]]></category>
		<category><![CDATA[SwiftUI Navigation]]></category>
		<category><![CDATA[SwiftUI Views]]></category>
		<category><![CDATA[NavigationView]]></category>
		<guid isPermaLink="false">https://appmakers.dev/?p=1292</guid>

					<description><![CDATA[<p>NavigationView in SwiftUI is a view for presenting a stack of views representing a visible path in a navigation hierarchy. Check out NavigationStack Tutorial, because NavigationView is outdated How to create a NavigationView in SwiftUI Let&#8217;s create a simple NavigationView using SwiftUI. NavigationView { List { Text(&#34;Item1&#34;) Text(&#34;Item2&#34;) Text(&#34;Item3&#34;) }.navigationBarTitle(Text(&#34;ContentView&#34;)) } How to change the style&#8230;</p>
<p>The post <a href="https://appmakers.dev/navigationview-swiftui/">NavigationView &#8211; SwiftUI</a> appeared first on <a href="https://appmakers.dev">AppMakers.Dev</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p id="navigationlink"><strong>NavigationView in SwiftUI is a view for presenting a stack of views representing a visible path in a navigation hierarchy.</strong></p>
<p><a href="https://appmakers.dev/navigationstack-swiftui/"><span style="font-family: var(--wpex-heading-font-family); letter-spacing: 0px;">Check out NavigationStack Tutorial, because NavigationView is outdated</span></a></p>
<p><span style="color: #494949; font-family: var(--wpex-heading-font-family); font-size: 24px; font-weight: 600; letter-spacing: 0px;">How to create a NavigationView in SwiftUI</span></p>
<p>Let&#8217;s create a simple NavigationView using SwiftUI.</p>
<pre><code class="language-swift" data-line="">        NavigationView {
            List {
                Text(&quot;Item1&quot;)
                Text(&quot;Item2&quot;)
                Text(&quot;Item3&quot;) }.navigationBarTitle(Text(&quot;ContentView&quot;))
        }</code></pre>
<h2>How to change the style of a navigationBarTitle to inline?</h2>
<p>By default the navigationBarTitle is set to Large. to set it to inline just set the displayMode parameter to .inline:</p>
<pre><code class="language-swift" data-line=""> NavigationView {
            List {
                Text(&quot;Item1&quot;)
                Text(&quot;Item2&quot;)
                Text(&quot;Item3&quot;) }.navigationBarTitle(Text(&quot;ContentView&quot;), displayMode: .inline)
        }</code></pre>
<h2>How to show a NavigationLink inside a NavigationView?</h2>
<pre><code class="language-swift" data-line=""> struct ContentView: View {
    
    var body: some View {
        
        NavigationView {
            
            NavigationLink(destination: DetailView()) {
                
                Text(&quot;Tap Me&quot;)
            }.navigationBarTitle(Text(&quot;ContentView&quot;))
            
        }
        
    }
    
}

struct DetailView: View {
    
    var body: some View {
        
        Text(&quot;Hello, I&#039;m a Detail View&quot;)
        
    }
    
}</code></pre>
<p>Find more about <a href="https://appmakers.dev/navigationlink-swiftui/">navigationLink</a> here.</p>
<h2>How to change a navigationViewStyle of a NavigationView?</h2>
<p>If you want to run your app on iPad you should know about a navigationViewStyle. Set it to DoubleColumnNavigationViewStyle() if you want a Split view style.</p>
<pre><code class="language-swift" data-line="">struct ContentView: View {
    
    var body: some View {
        
        NavigationView {
            
            NavigationLink(destination: DetailView()) {
                
                Text(&quot;Tap Me&quot;)
            }.navigationBarTitle(Text(&quot;ContentView&quot;))
            
            Text(&quot;Hello, I&#039;m a Detail View&quot;)
        }.navigationViewStyle(DoubleColumnNavigationViewStyle())
        
        
    }
    
}</code></pre>
<p>If you want it to show in a One-View way on iPad, use the StackNavigationViewStyle() instead. Check it on canvas or in an iPad simulator.</p>
<pre><code class="language-swift" data-line="">.navigationViewStyle(StackNavigationViewStyle())</code></pre>
<p>Learn more about SwiftUI using <a href="https://appmakers.dev/swiftui-tutorials/">SwiftUI Tutorials</a> by the AppMakers</p>
<p>If anything will change in the future, it is OK, you can always check the official documentation.</p>
<p><a href="https://developer.apple.com/documentation/swiftui/navigationview" target="_blank" rel="noopener noreferrer">NavigationView Documentation</a></p>
<p>Leave a comment to Submit the NEW and USEFUL code related to the topic of this post.<br />
Submit a brief and useful code only.</p>
<p>The post <a href="https://appmakers.dev/navigationview-swiftui/">NavigationView &#8211; SwiftUI</a> appeared first on <a href="https://appmakers.dev">AppMakers.Dev</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
