Last active
August 29, 2015 14:23
-
-
Save PaulChana/2e0e6be4e063dbe499f6 to your computer and use it in GitHub Desktop.
Put a control in NSWindow titlebar
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
| NSView *themeFrame = [[mainWindow contentView] superview]; | |
| NSRect c = [themeFrame frame]; | |
| NSRect aV = [accessoryView frame]; | |
| NSRect newFrame = NSMakeRect(c.size.width - aV.size.width, | |
| c.size.height - aV.size.height, | |
| aV.size.width, | |
| aV.size.height); | |
| [accessoryView setFrame:newFrame]; | |
| [themeFrame addSubview:accessoryView]; | |
| // NOTE - Make sure that accessory view has proper autosizing flags set |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NOTE - will work on 10.10, but will throw and error and shouldn't be used