I am writing an application using React Native on macOS. By default, the window shows as such:
I have managed to hide the title and make the titlebar transparent, as such (ignore the title in the screenshot):
I would now like to move the 'traffic lights' down/set the toolbar style to match the style shown below:
Unfortunately, I can't seem to figure out the combination of settings or so required to do this.
I am constrained to extending an objective-c AppDelegate implementation. I have the current code;
- (void)applicationWillBecomeActive:(NSNotification *)notification
{
NSWindow *window = [[NSApplication sharedApplication] mainWindow];
window.titleVisibility = NSWindowTitleHidden;
window.titlebarAppearsTransparent = true;
window.styleMask |= NSWindowStyleMaskFullSizeContentView;
}
This works to get to the second stage. I have tried variations such as ;
- (void)applicationWillBecomeActive:(NSNotification *)notification
{
NSWindow *window = [[NSApplication sharedApplication] mainWindow];
window.titleVisibility = NSWindowTitleHidden;
window.titlebarAppearsTransparent = true;
window.styleMask |= NSWindowStyleMaskFullSizeContentView;
NSToolbar *toolbar = [NSToolbar init];
window.toolbar = toolbar;
}
or
- (void)applicationWillBecomeActive:(NSNotification *)notification
{
NSWindow *window = [[NSApplication sharedApplication] mainWindow];
window.titleVisibility = NSWindowTitleHidden;
window.titlebarAppearsTransparent = true;
window.styleMask |= NSWindowStyleMaskFullSizeContentView;
window.toolbarStyle = NSWindowToolbarStyleUnified;
}
and other variations of toolbarStyle, to no avail.



The following code works for me: