Last active
June 15, 2024 19:19
-
-
Save usagimaru/a14866bd6630d6c1852b8c8fe965a10a to your computer and use it in GitHub Desktop.
Toggling NSSplitView’s pane with animation.
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
@objc func toggleMainView(_ sender: Any) { | |
let splitViewItem: NSSplitViewItem = self.splitViewItems[0] | |
splitViewItem.animator().isCollapsed = !splitViewItem.isCollapsed | |
} | |
@objc func toggleInspector(_ sender: Any) { | |
let splitViewItem: NSSplitViewItem = self.splitViewItems[1] | |
splitViewItem.animator().isCollapsed = !splitViewItem.isCollapsed | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment