Search results for

column

2,048 results found

Post

Replies

Boosts

Views

Activity

Reply to tableview mousedown
it would be almost good, but I forgot to tell my App is for macOSX, so the table is a NSTableView and I don't see any didSelectRow functionEven if the function exists somewhere, it would not be such a good solution, because the click of the column can be only the first time the row will be selected. After, the corresponding row would be selected and the function will not be called anymore
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’17
Reply to Customizing Back Button in Column 2 "Content" in SplitView
You can remove the toggle to show and hide the column with .toolbar(removing: .sidebarToggle) - https://developer.apple.com/documentation/swiftui/view/toolbar(removing:) For the back button, if you're navigating to a detail view, you can use .navigationBarBackButtonHidden() - https://developer.apple.com/documentation/swiftui/view/navigationbarbackbuttonhidden(_:) - on the detail view to hide the back button
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’23
Reply to Back supported Navigation-View
NavigationView has only been soft deprecated, so will still function on iOS 16. As for manually back deploying, since NavigationView has been split into two parts but come with added components, such as a path and control over column visibility as well as the new NavigationLink(_:value:) and navigationDestination modifier, it would be quite difficult to accomodate all of this.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’22
Reply to NSBrowser - edit cell contents
Well, it would really be easier to read the code than reading paraphrase of it.I can't really provide any code, but what I have is a NSBrowser hooked into CoreData, with the ability to add and remove entities in the hiearchy.Did you kook in code ? If so, please showI've tried hooking a double click event up to an IBAction (though a single click is what I'm ultimately after), from here I can get a reference to the browser.You mean the NSBrowser ?But to get a refernce, it would be easier to declare an IBOutlet. Why not ?Then I was attempting to get the selected item in the appropriate column, Please show codebut on the first column I was getting an empty array back when printing the indexPath. I must be doing something wrong there. Please show code, with the print statementI removed the non working code so I can't post here.Why did you need to remove to post here ?Conclusion: if you still want some help, please help others to help by showing the code.Unless you have already solved the problem.
Topic: UI Frameworks SubTopic: AppKit Tags:
Jan ’20
Reply to Random "duplicate column name" crashes using SwiftData
I had the exact same problem. On the first startup everything is ok, then on the second one it crashes. It seems SwiftData doesn't see the already existing column for one-to-many relationship. This, in turn, crashes the application because of the duplicated column. The solution that I found is to explicitly create the inverse relationship in the second model. So, in your case, changing your DeskPosition model to this: @Model final class DeskPosition { let id: UUID var title: String var desk: Desk? private var heightInCm: Double @Transient var height: DeskHeight { get { DeskHeight(value: heightInCm, unit: .centimeters).localized } set { heightInCm = newValue.converted(to: .centimeters).value } } init(id: UUID, height: DeskHeight, title: String) { self.id = id self.heightInCm = height.converted(to: .centimeters).value self.title = title self.height = height } }
Oct ’23
Reply to Xcode 8 Playground results not being posted
The issue is solved.First of all, I naturally assumed that the Results column of the Playground window would spring open when there were results to display.It wasn't until I was watching a YouTube video on Swift 3.0 that the answer was presented. The instructor typed some code into the Playground window and then ......... He dragged the Results pane in toward the code and Voila! there were the results.Unbelieveable!
Sep ’16
Reply to Illegal NSTableViewDataSource
I submitted the full code:The crash is on line 62import Cocoa import CoreData class RegistrationReportsViewController: NSViewController { required init?(coder aDecoder: NSCoder) { self.items = [] super.init(coder: aDecoder) } override func viewDidLoad() { super.viewDidLoad() showRegisteredStudents() tableView.dataSource = self tableView.delegate = self tableView.reloadData() } private lazy var fetchedResultsController: NSFetchedResultsController = { let fetchRequest: NSFetchRequest = Registration.fetchRequest() let frc = NSFetchedResultsController(fetchRequest: fetchRequest, managedObjectContext: self.persistentContainer.viewContext, sectionNameKeyPath: nil, cacheName: nil) frc.delegate = (self as! NSFetchedResultsControllerDelegate) return frc }() var items: [NSManagedObject] var managedObjectContext = (NSApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext let persistentContainer: NSPersistentContainer = { let container = NSPersistentContainer(name: ScorcentMasterReview) container.lo
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’20
Reply to Core Data code generation causes build failure
If you go to your data model and look at Configurations -> Default you will probably see that in the Class column everything is prefixed with a .. To fix this, go to each of your entities and on the right delete everything inside the module setting so that it goes to Global namespace. This should remove the . and will hopefully mean that your files are now found. If you clean and build again it should all work.
Oct ’16
Reply to swipeActions on macOS?
Even with two columns and a Label. It does not work for me. I am using Xcode 14 and Monterey var body: some View { VStack { List(podcast.episodes!) { episode in EpisodeView(podcast: podcast, episode: episode) .swipeActions(edge: .trailing) { Button (action: { self.deleteEpisode(episode) }) { Label(Delete, systemImage: trash) } .tint(.red) } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’22