Posts

Post not yet marked as solved
1 Replies
I have this same problem in a macOS project. It seems if there are multiple items with .automatic placement, all but one are hidden. This seems to be either a bug or undocumented behavior. The documentation is highly unreliable. Some placement options like .navigationBarLeading and .navigationBarTrailing are stated to be available in macOS 11.0+ but the compiler produces an error ("'navigationBarLeading' is unavailable in macOS") when used. And using .principal placement usually has a runtime error and crashes. Any help out there?
Post not yet marked as solved
2 Replies
I am having a similar problem with Xcode 12.2. My extension seem to work elsewhere, but not in Text views.
Post not yet marked as solved
4 Replies
Maybe this is better. Wrap View into a NavigationView. 		var body: some View { 				NavigationView { 						MasterPane() 						HSplitView { 								DetailPane() 								InspectorPane() 						} 				} 		} }
Post not yet marked as solved
4 Replies
I'm attempting something similar. Here's something basic I've come up with. It seems you can put multiple Views in the HSplitView (maybe up to 10?). I think you're supposed to get a toggle button to expose the sidebar for free, but I only see in it iPadOS, not macOS. See Hacking with Swift "how-to-add-a-sidebar-for-ipados".     var body: some View {         VStack {             Text("Items")             List(0..<16, id: \.self) { i in                 Text("Item \(i)")             }             .listStyle(SidebarListStyle())             Spacer()         }         .frame( idealWidth: 250, maxWidth: 250, maxHeight: .infinity)     } } struct DetailPane: View {     var body: some View {         Text("Details")             .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .center)     } } struct InspectorPane: View {     var body: some View {         VStack {             Text("Inspector")         }         .padding()         .frame( idealWidth: 250, maxWidth: 250, maxHeight: .infinity)     } } struct ContentView: View {     var body: some View {         HSplitView {             MasterPane()             DetailPane()             InspectorPane()         }     } }
Post not yet marked as solved
5 Replies
This is no longer working for me. Something changed with Xcode 11 beta 3 and remains in beta 4. The value of isPresented is nil prior to setting it to false and remains nil afterwards.Any ideas?
Post not yet marked as solved
7 Replies
Any luck? I'm running into the same issues.