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
3 answers

iOS 16 NavigationLinks in nested Lists unclickable

I am running xCode 14.2 on iOS 16.2 simulator and iOS 16.1.2 device. I have, in my app, NavigationLinks in sublists that are implemented as nested Lists. After updating my xCode, suddenly the NavigationLinks have become unclickable. It looks like…
0
votes
0 answers

On appear doesn't trigger every time

I have problem because on appear modifier doesn't call every time when I enter the screen and it calls randomly (when on appear is applied to navigation view). When I put it on some view inside navigation view it never calls. What is the problem, I…
0
votes
1 answer

SwiftUI Navigation link deactivated after switching apps

I am building an EV Station app on IOS, which provides users with a map and pins representing EV Charging Stations. I have a NavigationLink with destination: another view that applies filters to the map results. And label: A custom built button.…
0
votes
2 answers

Add a safe area to List after hiding the navigation bar in SwiftUI

I want to customize the navigation bar, but the refresh control is covered by the custom navigation bar after hiding the navigation. How can I adjust the position of the refresh control? import SwiftUI struct ContentView: View { var…
gaohomway
  • 2,132
  • 1
  • 20
  • 37
0
votes
0 answers

SwiftUI NavigationSplitView - Show only List Column in iPad Portrait mode

I want a two column-view in a Swift UI app, where the left column displays a list and the right column displays a detail view. This works fine like this: struct ContentView: View { @State private var columnVisibility =…
mica
  • 3,898
  • 4
  • 34
  • 62
0
votes
1 answer

How to navigate to the details view from horizontal list on map view in SwiftUI?

I'm try to navigate through NavigationView and NavigationLink(destination: but it's not working for me. ScrollView(.horizontal) { LazyHStack { ForEach(0...10, id: \.self) { index in …
0
votes
1 answer

In NavigationView, List item appears mid-screen rather than at top when @Environment(\.presentationMode) is defined

I'm facing a weird bug where a list item within a NavigationView appears below a gap. When I scroll, it resets to correct location. Minimum reproducible example on Xcode 14.1, iOS 16.1.2: import SwiftUI @main struct Test_2022_12_03_02App: App { …
0
votes
3 answers

Add NavigationLink to Custom designed button in Swift UI

I am trying to add NavigationLink inside NavigationView in which there is a custom designed button. I want to navigate on that button tap but NavigationLink code gives compilation error. it requires localisedTitle which I don't want to display and…
0
votes
1 answer

in SwiftUI, Can't navigate from one screen to another screen using response from @State type datatype

I want to Navigate from HomeView to PopularArtWorkFilterView. I used NavigationView and NavigationLink for navigating. Navigation is fired but PopularArtWorkFilterView screen not found. Just this is View All Popular art work seen after clicking.…
0
votes
1 answer

SwiftUI UISearchController replacement: search field, results and some scrollable content fail to coexist in a meaningful manner

Starting with this var body: some View { ScrollView { VStack(spacing: 0.0) { Some views here } } .edgesIgnoringSafeArea(.top) } How would I add List(suggestions, rowContent: { text in …
0
votes
1 answer

SwiftUI - Update name of the button to what parent view has on it

I have ImageSettingView which Im using multiple places. When I used this view at multiple place in my project it takes static name all time in the navigationBarItem i.e Text("Image Collab View"). I want to give dynamic name change based on where…
0
votes
1 answer

How to hide tab bar swift ui ios

I implemented my own tab bar: struct MainView: View { @State var selectedIndex = 0 let icons = ["menucard", "house"] let iconsNames = ["meniu", "oferte"] var body: some View{ VStack(spacing: 0){ ZStack{ …
0
votes
0 answers

The app preview on pc is not the same when uploaded to iphone

I have created a simple background with a menu in swiftui - The content view and IOS simulatores display my app correctly. But when i upload the app to my iphone, i lose my custom background and features of the menu bar. The tutorial that i have…
0
votes
1 answer

SwiftUI Bug? Creates more Views than expected

Given the following code: import SwiftUI struct ContentView: View { var body: some View { NavigationView { VStack { ForEach(0..<3) { index in NavigationLink(destination: TestView(index))…
0
votes
0 answers

SwiftUI : Navigate Between subviews from list without going back through the list

I want to be able to navigate between the subviews of a list of news articles without having to return to the list each time. I don't know how I could do it. Here is a simplified view of my list : struct ListPostsView: View { @StateObject var…
dibs
  • 174
  • 1
  • 12