56 questions
1
vote
1
answer
77
views
How to keep the toolbar picker on the top while navigating to a deeper level view?
My SwiftUI app uses a Project List in the Sidebar (NavigationSplitView) and a toolbar picker on the detail view. Using this picker I can switch between different subviews (modules) for the detail view....
4
votes
0
answers
172
views
Create Xcode-like GUI using SwiftUI?
I'm trying to learn SwiftUI by rewriting an old AppKit-based editor of mine. I'm currently stuck on something that is (fairly) straightforward using AppKit but seems almost impossible in SwiftUI (...
0
votes
0
answers
92
views
Changing color of SwiftUI NavigationSplitView's collapse sidebar toggle button
The collapse toggle button of NavigationSplitView of SwiftUI seems to behave getting the theme color of the OS. I found this article Getting started with the SwiftUI NavigationSplitView directly to ...
2
votes
1
answer
134
views
Why does NavigationLink break my NavigationSplitView
Below I have created a simple NavigationSplitView for MacOS using Swift. Both the sidebar and the detail page rely on an Observable value. When I switch that observable value both sidebar and detail ...
0
votes
1
answer
64
views
Preselection of list in NavigationSplitView with SceneStorage
I've got a list in sidebar of NavigationSplitView. The view in detail should change by selecting an item. For restoration of view I'm using SceneStorage like this:
import SwiftUI
enum ListType: ...
0
votes
2
answers
268
views
SwiftUI NavigationPath in NavigationStack(path: $path) in NavigationSplitView does not Compile
I have a simple NavigationSplitView app with a simple SwiftData model. I'm trying to use NavigationPath in order to return to the ThingListView when several layers deep. Every article I've found and ...
0
votes
0
answers
114
views
NavigationLink not redirecting to destination when NavigationSplitView is not the root view in SwiftUI
I have the following SwiftUI code, where everything works correctly when NavigationRoutes is the root view:
struct NavigationRoutes: View {
@State private var currentSelection: Destinations?
...
0
votes
0
answers
23
views
Widget Launch to NavigationSplitView Detail
I'm trying to use NavSplitView and have a home screen or Lock Screen widget open the app to the tapped tool but my widget/navigation structure clearly needs to be adjusted.
@main
struct ...
1
vote
1
answer
55
views
how to have selection for every table for each item in sidebar in NavigationSplitView
I have an array of sessions. Each session has an array of records.
There are sessions in NavigationSplitView in sidebar. There is a table of records in detail view. When user click on a session new ...
0
votes
0
answers
397
views
SwiftUI TabView got wrong width in NavigationSplitView's side bar view when running on iPad simulator
I've been learning SwiftUI for a while, and it's really great. I run into a layout problem when I tried to add a TabView in sidebar view of NavigationSplitView. It's running as expected on iPhone ...
2
votes
1
answer
352
views
Determine if a SwiftUI view is presented as sidebar?
I'm using a NavigationSplitView to present a two-column view, with a sidebar and detail content on iPad, which is collapsed into a single-column view on iPhone and when the app is used in Split View ...
0
votes
2
answers
207
views
SwiftUI NavigationSplitView - Nested List Not Animating
I've encountered a SwiftUI NavigationSplitView bug in my app that I'd appreciate help with, I've spent quite some time trying to work out a solution to this problem. I have a main list, which has ...
1
vote
0
answers
69
views
SwiftUI NavigationSplitView and Keyboard avoidance
Once again pulling my hair out over SwiftUI. Here's a NavigationStackView that looks great until the keyboard comes up.
NavigationSplitView {
NavigationStack {
Navigation()
....
0
votes
1
answer
234
views
NavigationSplitView with selection loosing new selection when item is added
I am working on SwiftData project. I found the problem when adding new items to a NavigationSplitView that the first item was added without a problem. The selection was changed so that the Detail page ...
0
votes
1
answer
111
views
SwiftUI crashing when deleting item in NavigationSpiltView
I have a NavigationSplitView where I list items in data storage. If I delete the selected one (the one that is showing details in the "detail" part of the navigationsplitview, the app ...
5
votes
2
answers
794
views
navigationSplitViewColumnWidth being ignored. Cannot widen sidebar or detail column
I am trying to use NavigationSplitView to create a two-column structure where right column depends on left column and the left column is a bit larger than the right. Thinking I might want the two ...
1
vote
0
answers
165
views
Animation issue with SplitNavigationView
I'd like to use a NavigationSplitView for the iPad version of my app, but I experience some animation issues, when in compact mode on an iPad (split view or slide over) and when I'm running the app on ...
0
votes
1
answer
52
views
Selected item on Sidebar forced back to nil when returning from Detail view (on iPhone)
I have a NavigationSplitView with a Sidebar and Detail view. When selecting an item from the sidebar, the Detail view is updated to show what was selected. This all works fine so far on both an iPhone ...
2
votes
0
answers
259
views
How to navigate from NavigationSplitView to new view opened full screen
I want to ask for help with NavigationSplitView for iPad app. My idea is to have NavigationSplitView where I can display some filters/sections on the left side and list of objects on the right side (...
4
votes
1
answer
235
views
preferredCompactColumn is being passed as NavigationSplitViewColumn.sidebar but still seeing details page on iOS
As we can see in the code preferredColumn is set to NavigationSplitViewColumn.sidebar but when I open this app in iPhone 15 pro preview the NavigationSplitViewColumn.detail is shown and then user have ...
0
votes
1
answer
241
views
How to implement Finder like searchbar in SwiftUI?
It's easy to show a search bar using NavigationSplitView and .searchable on macOS app titlebar. But I have no idea to custom the search bar.
My question is:
How to use NavigationSplitView and ...
3
votes
2
answers
995
views
SwiftUI NavigationSplitView Detail View not getting updated
In a NavigationSplitView, the Navigation split is just an array of NavigationLinks via a for each loop. This works as expected.
The Detail split is intended to be a View that changes based upon the ...
1
vote
0
answers
147
views
tvOS and NavigationSplitView not working properly
I tried NavigationSplitView in tvOS but as you can see it goes full screen with a sidebar and it does not display the details column, what I'm doing wrong?
struct ListViewDetails: View {
var ...
2
votes
1
answer
655
views
NavigationSplitView - last part not working - Why and what's the difference?
Still playing with the NavigationSplitView, but found no solution for the following.
I need/want to use here the .navigationDestination(for: .....) modifier and I want to call the different ...
2
votes
1
answer
335
views
NavigationSplitViewVisibility.detailOnly not working in macOS
I've been having lots of problems with NavigationSplitView in SwiftUI under macOS (14.3 if it matters). The latest one is this: NavigationSplitViewVisibility.detailOnly doesn't seem to do anything, it ...
3
votes
1
answer
118
views
NavigationSplitView crashes if I select an item in the sidebar after I removed other items
My NavigationSplitView crashes if I select an item in the sidebar after I removed other items: Thread 1: EXC_BREAKPOINT (code=1, subcode=0x1c44d488c)
How to reproduce:
Launch the app from the ...
2
votes
4
answers
1k
views
Disable collapsing Sidebar/NavigationSplitView
How to disable sidebar minimization in macOS? In app like App Store, Music, Reminders, Mail, Messages this is disabled. In an app like Feedback Assistant, there is a critical error - after minimizing ...
2
votes
0
answers
121
views
SwiftUI updates selection state twice when using List and TabView
I'm updating my watch app to support the latest features and UI on watchOS 10.
I want to implement NavigationSplitView, where the user will select a route from a List and view it in a TabView, where ...
1
vote
0
answers
143
views
Prevent slide out behavior of Sidebar in NavigationSplitView
I have a navigationSplitView on an iPad. The detail view contains a pdfView (representable) with page style (pdfView.usePageViewController(true)). I have a button to control visibility of the ...
1
vote
0
answers
77
views
NavigationSplitView's sidebarToggle button temporarily disappear when showing sidebar
I have a simple macOS, targeting macOS 13.0, which displays a NavigationSplitView with a sidebar and a detail.
The sidebar toggle button works as expected, except when the sidebar is hidden and I ...
4
votes
2
answers
874
views
SwiftUI ToolbarItem button disappears after rotation in iOS17
I am currently experiencing issues with a ToolbarItem in a NavigationSplitView detail view.
The ToolbarItem button is disappearing after rotating from portrait to landscape and then back to portrait ...
1
vote
1
answer
600
views
Control NavigationLink in NavigationSplitView from multiple places (List and Picker)
I have a list within a NavigationSplitView. The list has NavigationLinks, which when selected, load a detail view:
List(selection: $selectedMode) {
ForEach(modes, id: \.self) { modeInfo in
...
1
vote
0
answers
163
views
Swift Toolbars are bleeding using Tabview and NavigationSplitView
I have a Tabview, each tab links to a new Scene which has 3 column NavigationSplitView, sidebar, content and detail.
Each of those 3 splitviews have a toolbar. They work fine until you click between ...
1
vote
1
answer
294
views
In SwiftUI, how do I pass a a NavigationSplitViewVisibility to a subview?
My app uses a NavigationSplitView to provide a 3 column (sidebar, content, detail) layout. The sidebar is implemented in one view (SideBarView). The content view is implemented in a separate view (...
1
vote
1
answer
416
views
NavigationLink on detail NavigationSplitView breaks navigation stack hierarchy
For my Mac and iPad targets, I use on my app a NavigationSplitView with standard structure:
NavigationSplitView {
FirstView()
} content: {
SecondView()
} detail: {
ThirdView()
}
In fact, ...
2
votes
0
answers
317
views
NavigationSplitView does not collapse when I select an item (changing the detail view)
When I select an item in my NavigationSplitView, the menu does not dismiss.
I am using a encapsulated view that is used in the iPhone layout / before iOS 16 and I'm wondering if there is a command to ...
2
votes
1
answer
1k
views
Does anybody have a working NavigationSplitView with NavigationStack in Details View?
No matter how it is set up, a complex 3 Columns NavigationSplitView with NavigationStack crashes or has inconsistent workflow.
Sidebar selection determines which content (or feature) is in Content.
...
3
votes
0
answers
359
views
NavigationSplitView resetting when app enters background
I've been trying to build an app using NavigationSplitView and SwiftUI on iOS 16. I noticed that as soon almost as the app enters the background (sometimes I have to wait a few seconds before ...
0
votes
1
answer
2k
views
NavigationLink does not append to path inside NavigationSplitView/NavigationStack
The following code shows that $path is always 0, despite tapping a NavigationLink inside the stack. That means that when I select a panel, and tap on the navigation link to go to 'firstPanel subview', ...
16
votes
1
answer
3k
views
SwiftUI: NavigationSplitView title bar issues
I’ve filed this as a bug with Apple (FB12119822) since I’m fairly certain there’s nothing wrong with my code, but posting here for posterity and in case other folks have found a workaround.
When ...
3
votes
0
answers
401
views
SwiftUI: NavigationSplitView with mixed conditional rows and sections crashes
I’ve filed this bug with Apple (FB12119791) since I’m pretty sure it’s not a mistake in my code, but posting here both for posterity and to see if anyone has found a solution. It’s also hard to ...
2
votes
1
answer
589
views
How can I show an overlay/popover on a Mac app that covers the entire window (including the navigation bar) with SwiftUI?
I am using SwiftUI to build a native macOS app and when using NavigationSplitView or NavigationStack the navigation/toolbar is always forced to the top. I've tried ZStack, .overlay and even ...
1
vote
0
answers
76
views
swiftui - NavigationSplitView Crashes in Landscape Mode on iPad (iOS 16.2)
i am working on an app for iphone and ipad and wanted to use NavigationSplitView.
When running on an iPad in landscape orientation i am running into a crash on iOS 16.2 that i can't really understand.
...
3
votes
1
answer
703
views
.navigationDestination(isPresented:) doesn't work with 3 column NavigationSplitView
After a couple of days struggling with programmatic navigation in SwiftUI and 3 column NavigationSplitView I found that .navigationDestination(isPresented:destination:) works only between sidebar and ...
1
vote
1
answer
314
views
Binding’s inside NavigationSplitView detail (TextField, TextEditor)
I'm using a two-column NavigationSplitView. Trying to figure out how to update the data model via .onSubmit modifier and use a TextField view without Binding.constant.
Within the detail section, I ...
11
votes
5
answers
7k
views
How can I permanently show sidebar in a SwiftUI NavigationView or SplitNavigationView exactly like the Apple Settings App on iPad?
I am trying to display a two column NavigationView in my app exactly like the settings on the iPad. With no way to collapse the sidebar on an iPad. I would have thought using a NavigationView with ...
2
votes
1
answer
403
views
How to unmute colors in SwiftUI's NavigationSplitView sidebar
I am using NavigationSplitView, introduced in iOS16, with a basic list and attempting to color a system image with standard colors. I am noticing that when the navigationSplitViewStyle is .automatic ...
3
votes
0
answers
452
views
SwiftUI NavigationSplitView column visibility on iPhone?
I'm trying to create a 3-column layout in SwiftUI.
The first column is a LazyVGrid of selectable items. The selection then impacts a list of items in a content view (second column) which also isn't a ...
1
vote
1
answer
504
views
Preselecting a (dynamic) item in NavigationSplitView
I'm using NavigationSplitView to structure the user interface of my (macOS) app like this:
struct NavigationView: View {
@State private var selectedApplication: Application?
var body:...
4
votes
1
answer
2k
views
NavigationSplitView column visibilty does not work on iPhone
I have a two column NavigationSplitView with a linked NavigationSplitViewVisibility variable. On the iPad everything works as expected. Tapping on the “Go to Detail View” in the sidebar will go to the ...