To add a toolbar to your macOS app built with AppKit, you can follow these steps:
Here's an example of how to implement actions for two bar button items in your view controller:
main.swift229 chars11 lines
In Interface Builder, you can connect the "importFile" and "exportFile" actions to the corresponding bar button items in the toolbar by Control-dragging from the bar button item to the view controller and selecting the appropriate action.
That's it! You now have a functional toolbar in your macOS app built with AppKit.
gistlibby LogSnag