Posts

Post not yet marked as solved
2 Replies
2.6k Views
Hi I use a WindowsGroup with a NavigationView and inside of this a list as a sidebar and an HStack for the content. In addition I use a toolbar with several icons. It seems, that the toolbar is behind the content if the button contains only an image. It works correctly if I use an image and a text for the button. Only when I move the mouse pointer over the toolbar icon the icon becomes active and stays active. It doesn't matter where I place the toolbar or whether I use a padding for the content or not. And if I remove the top padding for the content the complete content area goes from edge to edge. I guess that I missed some modifier for the toolbar and/or the content, but can't figure out which one. Thank you for helping Swift version 5.5.1 Xcode 13.1 MacOS Monterey (12.0.1)     var body: some Scene {         WindowGroup {             NavigationView{                 List {                     Text("One")                     Text("Two")                 }                 Text("Hello, world!")                     .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)                     .background(Color.gray)                     .padding(.all, .zero)                     .padding(.top, 1.0) // removed this in video 2                     .toolbar {                         ToolbarItemGroup(placement: .navigation) {                             Button(action: {                             }, label: {                                 Image(systemName: "sidebar.left").imageScale(.large)                             })                             Button(action: {                             }, label: {                                 HStack{                                     Image(systemName: "sidebar.left").imageScale(.large)                                     Text("")                                 }                             })                         }                     }             }         }         .windowStyle(HiddenTitleBarWindowStyle())     }
Posted Last updated
.
Post not yet marked as solved
1 Replies
723 Views
Hi allAs written in the title I'm a beginner and started to familiarize with core data and modelling entities, table views and array controller. But now I'm a bit confused about the cocoa binding of the core data model to the view. I am surprised that such an elementary topic is so complicated to implement.Does anybody know a simple tutorial with examples how to connect core data with an array controller with a table view? I found a lot, but the most are old and not working anymore and/or incomplete. I work with the beta version of xCode (version 11) and swift 5.Thanks for any hint
Posted Last updated
.