Какао / OSX - NSWindow standardWindowButton ведет себя странно, когда копируется и добавляется снова

В моем приложении я меняю положение стандартных оконных кнопок закрытия / минирования / расширения следующим образом:

 //Create the buttons
    NSButton *minitButton = [NSWindow standardWindowButton:NSWindowMiniaturizeButton forStyleMask:window.styleMask];
NSButton *closeButton = [NSWindow standardWindowButton:NSWindowCloseButton forStyleMask:window.styleMask];
NSButton *fullScreenButton = [NSWindow standardWindowButton:NSWindowZoomButton forStyleMask:window.styleMask];


//set their location
[closeButton setFrame:CGRectMake(7+70, window.frame.size.height - 22 - 52, closeButton.frame.size.width, closeButton.frame.size.height)];
[fullScreenButton setFrame:CGRectMake(47+70, window.frame.size.height - 22 -52, fullScreenButton.frame.size.width, fullScreenButton.frame.size.height)];
[minitButton setFrame:CGRectMake(27+70, window.frame.size.height - 22 - 52, minitButton.frame.size.width, minitButton.frame.size.height)];

//add them to the window
[window.contentView addSubview:closeButton];
[window.contentView addSubview:fullScreenButton];
[window.contentView addSubview:minitButton];

Теперь, когда появляется окно с кнопками, возникают две проблемы: 1. они серые и имеют неправильный цвет 2. когда мышь над ними, они не показывают знак + - или x

может кто-нибудь сказать мне, что я делаю не так. Благодарю.

Ответы на вопрос(4)

Ваш ответ на вопрос