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
0
votes
1 answer

How to fix double back button in SwiftUI

I got 2 views. On the second view I have list of exercises and when I choose one of them and go inside I see double back. It's driving me crazy. First one: import SwiftUI struct ProgrammView: View { var body: some View { …
0
votes
1 answer

navigation in SwiftUI using UINavigationController

I'm new to SwiftUI, but experienced in UIKit. Recently I started new app and Created first LoginView using UIKit but then after created SignUp and VerifyOTP view using SwiftUI. LoginViewController was embeded in UINavigationController and that's why…
0
votes
1 answer

onDisappear not called when NagivationView navigates to different view

In a NavigationView, when selecting a different destination, this destination view calls onAppear as expected. However the onDisappear is not called as another destination is selected, at least not immediately, only after a third destination gets…
Fred Klein
  • 448
  • 6
  • 13
0
votes
0 answers

How to add TabView/anything under NavigationView?

I have this code to display NavigationView with toolbar, searchable: var body: some View { NavigationView { TabView(selection: $selectedIndex) { ... } .tabViewStyle(.page(indexDisplayMode: .never)) …
0
votes
1 answer

How do you remove the margin from the top of the screen to a form?

I have this space between the top of the screen and my text input box. How can I reduce this space? I don't want to bring the input box up too far as it will be obstructed by the notch. However, I want to bring it up enough so it isn't looking…
0
votes
0 answers

Get back to root view

I have a view that's inside a TabView and I want to make the TabItem return the user to the root view when they click on it. The view: import SwiftUI struct FeedsView: View { var body: some View { NavigationStack { List { …
0
votes
1 answer

How to add the Navigation Bar space in SwiftUI NavigationView

I hide the navigation bar and provide a customized navigation bar. But my list appears below the navigation bar. I want the list to appear below the navigation bar when scrolling. My desired effect: Actual effect: Blocked 0 import SwiftUI struct…
gaohomway
  • 2,132
  • 1
  • 20
  • 37
0
votes
2 answers

VStack inside NavigationLink

I am trying to VStack an Image and a Text inside a NavigationLink. This is my code: NavigationLink(destination: ContentView()){ Circle() .fill(Color.green) .frame(width: 50, height:50) .overlay(Image(systemName:…
0
votes
2 answers

Swift navigation bar not appearing

I’m new to Swift. Currently trying to build a test app. My tab nav bar won't appear when i preview the app. When in preview, i can click it and switch between pages, but i can't see it. Created a storyboard with a tab bar controller and view…
0
votes
0 answers

Invalid attempt to call -[UIApplication requestSceneSessionDestruction:] from an unsupported device

As per apple documentation Instance Property dismiss() is An action that dismisses the current presentation. So I use it inside a NavigationView so that I can remove/pop the current view. Once I pressed this button console shows this log…
Qazi Ammar
  • 953
  • 1
  • 8
  • 23
0
votes
0 answers

SwiftUi with TabView and navigationView

I'm migrating a large iOS project developed using VIPER architecture from ViewControllers to SwiftUi. To do this I'm using ViewAdapters to connect VIPER routers and presenters with SwiftUI views. Although this is working fine I'm having problems…
0
votes
0 answers

SwiftUI .searchable modifier makes searchbar twink

I'm using .searchable to embed a search bar into a list view. However, when the .searchable is nested in a NavigationStack (iOS 16 API), it is twinking when the page is loaded (shows up at first and disappears quickly). I hope both pages have a…
Sheffield
  • 355
  • 4
  • 18
0
votes
0 answers

iOS NavigationView toolbar spacing behavior differences across apps

I'm building an iOS framework that provides certain UI components for various consuming apps. In one of the UI components, I'm presenting a bottom sheet with a NavigationView overlaid with a ZStack for color. In my test app, everything looks…
Matt Hamann
  • 1,488
  • 12
  • 24
0
votes
0 answers

TabView taking Top Space in SwiftUI

Hi I am currently working on swiftUI project. I am facing a very strange issue. Here is the code for my problem. As you can see that, this tabView is taking some space from the Top which is highlighted in Red Color. It should be All blue in the…
0
votes
0 answers

navigationBarBackButtonHidden(true) does not work on NavigationView Ipad Portrait

Currently have an Ipad app with a NavigationView. In portrait mode, the button to open the side drawer is turned into a back button. There is no way currently to hide this back button, or change it. Hiding the entire navbar works, but is not the…
Cory .D
  • 71
  • 1