0

My Application work as expected in 10.6, 10.7, 10.8 and 10.9, but in 10.10 I found that the windows background color is not set as in the old OSes....leaving gray windows.

This is the code:

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
    self.window1.backgroundColor = [NSColor whiteColor];
    self.window2.backgroundColor = [NSColor whiteColor];
}

each help is appreciated

Mike97
  • 596
  • 5
  • 20
  • This was a bug that was fixed in developer preview 6, I had the same problem: http://stackoverflow.com/questions/25006794/textured-nswindow-with-setbackgroundcolor-has-a-tinged-grey-background – Luke Sep 21 '14 at 14:02
  • Problem disappeared in the latest DP (and latest xcode 6) – Mike97 Sep 21 '14 at 18:04
  • Maybe it helps you: http://stackoverflow.com/a/27042648/2360439 – D.A.H Nov 20 '14 at 18:04
  • Thanks but this was simply solved by Apple in the latest DPs of Yosemite...now works great – Mike97 Nov 20 '14 at 21:08

1 Answers1

0

Did you try setting it in - (void)windowDidLoad of your NSWindowController? It works for me this way under 10.10 DP 6.

Elwisz
  • 654
  • 1
  • 6
  • 18
  • Sorry, but doing as you say, I just recreated the problem I have in Yosemite, even on old OSes.. – Mike97 Aug 25 '14 at 18:57
  • Did you try it in a vanilla Xcode project? If not, can you rule out that self.window1 and self.windo2 are nil? Did you check the window's settings in IB? Did you check the view hierarchy, i.e. did you make sure the window's `contentView` isn't a custom `NSView` that is drawing the background? – Elwisz Aug 26 '14 at 08:51
  • I use rotating windows in this app, so that each contents view is processed to be passed from one window view to another. So rule out simple problems. I connected an IBAction to a button to make a test, but backgroud windows is not changed even in this way, with a clean log. So I created a new project, but still this happens....and now this is really stupid. I decided to upgrade to latest XCode 6 from the Developper portal, but I'll do this after I did a clean OSX 10.10 installation . I'll know soon the response – Mike97 Aug 26 '14 at 16:01
  • Bingo, with latest DP + latest xCode 6, now work as expected...but I could not find any explanation/bug related. – Mike97 Aug 26 '14 at 18:54