Skip to content

Sample code for programmatically creating NSToolbar and hook it to a NSWindow

License

Notifications You must be signed in to change notification settings

billibala/SUIToolbarPlay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SUIToolbarPlay

Sample code for programmatically creating NSToolbar and hook it to a NSWindow

Toolbar icons are from Josh Hughes' Perspective Icons set.

Creating toolbar programmatically

This sample coode is base on the Xcode template when you create a macOS SwiftUI app. Changes that are relevant are in these 2 files:

  • AppDelegate.swift
  • Toolbar.swift

I have also created a post accompanying this sample code: https://medium.com/@billibala/swiftui-how-to-add-a-toolbar-to-window-in-macos-app-fc8da5947fe8

References

Sample code and documentation that help me make this sample code:

About

Sample code for programmatically creating NSToolbar and hook it to a NSWindow

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages