Last active
October 30, 2016 15:27
-
-
Save n3tr/fed204fdaace2917dc588c5efdf6722e to your computer and use it in GitHub Desktop.
WindowController.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fileprivate extension NSTouchBarCustomizationIdentifier { | |
static let windowBar = NSTouchBarCustomizationIdentifier("com.n3tr.countertouchbar.touchbar") | |
} | |
fileprivate extension NSTouchBarItemIdentifier { | |
static let label = NSTouchBarItemIdentifier("com.n3tr.countertouchbar.label") | |
} | |
class WindowController: NSWindowController { | |
// ... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class WindowController: NSWindowController { | |
// .. | |
override func makeTouchBar() -> NSTouchBar? { | |
let touchBar = NSTouchBar() | |
touchBar.delegate = self | |
touchBar.customizationIdentifier = .touchBar | |
touchBar.defaultItemIdentifiers = [.label] | |
return touchBar | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment