I'm doing a sort of kiosk app with a number of buttons that swap out the subviews in a window. There are about a half dozen subviews, all of which are NSViews. One of the subviews has in it a PDFView displaying a local PDF file. Without any core animation, everything works as expected. When I click the button corresponding to the PDF, everything shows up and I can see the PDF.
I want to enable core animation, so I can have smooth transitions switching between subviews using
[[contentView animator] replaceSubview:currentView with:newView];
In IB, I enable 'wants core animation layer' for all my views. Now the transitions between subviews are smooth and animated, but when I switch to the PDF view, the view is blank. If I click and drag in the blank window, some of the text in the PDF is highlighted, like its there, but not being drawn. If I switch back and forth, it shows the PDF the second time.
It seems like its not drawing the PDFView on the first time through, but doing setNeedsDisplay:YES on the view doesn't seem to help.
Turning off the 'wants core animation layer' for the views makes it work properly, but with no core animation transitions. Any idea what's going on here?