Last active
January 20, 2019 18:30
-
-
Save mminer/02d3846a0b5b14eba84c004184e33cc3 to your computer and use it in GitHub Desktop.
Delegate for NSOutlineView that allows specifying an item right-click menu.
This file contains 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
import AppKit | |
protocol OutlineViewDelegate { | |
func outlineView(outlineView: NSOutlineView, menuForItem item: Any) -> NSMenu? | |
} | |
extension OutlineViewDelegate { | |
func outlineView(outlineView: NSOutlineView, menuForItem item: Any) -> NSMenu? { | |
return nil | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment