Questions tagged [swiftui-navigationview]

For questions about NavigationView - a view in Apple's SwiftUI framework that presents a stack of views representing a visible path in a navigation hierarchy. When using this tag also include the more generic [swiftui] tag where possible.

Links:

583 questions
1
vote
1 answer

MacOS Toolbar Space makes Items disappear despite sufficient space

I created a macOS App with a NavigationView and a Toolbar. Somehow next to my toolbarItem there is a lot of space.. So whenever I change the size of my apps window the toolbarItem disappears. Despite there is still a lot of space for my item. I did…
printDavid
  • 165
  • 1
  • 9
1
vote
0 answers

Combining Navigation Bar, TabView and searchable causes the NavigationBar UI issue with lists

Combining Navigation Bar, TabView and searchable causes the NavigationBar and Search InputField to stay stationary when scrolling up on the second selected tab. If I run the code below and first click on the Bookmark tab and scroll the list up, I…
J. Edgell
  • 1,555
  • 3
  • 16
  • 24
1
vote
0 answers

SWIFTUI : Wide space appear on top as switch between tabs

Basically, I am working on a project in which there is a navigation process, therefore, I have to implement navigationview with tabview. As app loads, initial screen appear(homeview) normal, but an issue arises as soon I switch between tab option,…
1
vote
2 answers

SwiftUI NavigationView popping when observed object changes

There are three views. Main view, a List view (displaying a list of locations) and a Content view (displaying a single location). Both the List view and the Content view are watching for changes from LocationManager(GPS position). If the user…
Karlth
  • 3,267
  • 2
  • 27
  • 28
1
vote
1 answer

Combine NavigationTitle and Navigation Back Button SwiftUI

I have an app that has a navigationLink from one view to another, but when the NavLink moves to the second view, the NavigationTitle of that view is pushed, down, it's not inline. Is there any way to combine the toolbar and the title? I put my code…
user18457910
1
vote
0 answers

ScrollView in a NavigationView with a .navigationTitle presented in a .sheet : animation glitch

The problem is very simple. I would like a ScrollView with a navigation bar (with its two appearances : a large title when the view is not scrolled ; a compact appearance otherwise). It's simple and it works...unless the view is presented with…
Adrien
  • 1,579
  • 6
  • 25
1
vote
0 answers

NavigationView stack pops after navigating to View

struct ConversationsView: View { @State private var showNewMessageView = false @State private var showChatView = false var body: some View { ZStack(alignment: .bottomTrailing) { NavigationLink(destination:…
Yazan A
  • 11
  • 2
1
vote
1 answer

Swiftui - Handling Tab navigation inside a root navigation properly

The structure of my swiftUI app navigation is as below View : A { Navigation View { // List View on click // Takes me to a Tab View NavigationLink(destination : Tab View) } } View : Tab View { ViewX .tag(0) …
1
vote
2 answers

SwiftUI List Separator within NavigationView Problem

I'm not sure if this is well-known-issue or not but it is very odd. The problem can be reproduced with Apple's example code navigationBarItems(leading:trailing:) As you can see, list separators have extra leading space that look like they are…
J.K
  • 133
  • 7
1
vote
0 answers

SwiftUI technique to update UINavigationBarAppearance.backgroundImage dynamically?

I am implementing a gradient background for the top navigation bar in SwiftUI using a standard NavigationView. For the gradient I am using a UIGraphicsImageRenderer to create a gradient image which I then assign to the backgroundImage of…
1
vote
1 answer

NavigationTitle in second view not appearing

I'm new to IOS-app development. I've created (albeit with the help of a guide) a login page which is fully functional. Whenever the authentication of the user is completed, the user is forwarded to HomepageView(). However, I have read that it is bad…
1
vote
1 answer

SwiftUI private route based on Authentication Status

I need to implement a mechanism just like react private and public route on swiftUI. Basically I have tens of views and some of these views requires authentication based on user logged in status. So far I have tried to hold current screen in an…
1
vote
1 answer

iOS 15 Navigation Bar

I'm having this issue with the Navigation Bar in SwiftUI, where I don't want the Second View to have the ContentView's Navigation Bar. The preview in the SecondView behaves normal, but once I run the simulator and using the NavigationLink to go to…
user14816779
1
vote
3 answers

SwiftUI bug with navigation view rotation?

While testing my app to make sure it behaves properly under screen rotations, I discovered that navigation links do not work after a certain sequence of rotations. The following is a MWE: struct ContentView: View { var body: some View { …
Jay Lee
  • 1,684
  • 1
  • 15
  • 27
1
vote
1 answer

How to handle opening a URL to load a specific app screen?

I want to implement a functionality where when a user clicks a URL to reset their password, it directs them to the "PasswordReset" screen in my app. Currently, when I click the URL (ex: https://app.myApp.com/auth/reset?token=1234), it opens up to…