Reputation: 10351
How can I flip the coordinate system of an NSWindow? I know it has a Content View, but how can I flip the coordinate system of that specific View which is of type NSView?
In a sub-view of my NSWindow's Content View I flip the coordinate system by subclassing NSView, placing that in my window, and in that subclassed NSView I implement method isFlipped to return YES. No idea how I could have NSWindow make it's content view out of "MyFlippedSubclassedNSView"
Upvotes: 3
Views: 3387
Reputation: 96373
You can't change the internal co-ordinate system of an NSWindow. The closest you can get is to have a flipped view as the content view.
Chances are you don't actually need a flipped content view or window, though. What are you actually trying to accomplish by flipping the co-ordinate system?
No idea how I could have NSWindow make it's content view out of "MyFlippedSubclassedNSView"
Do that. Make a MyFlippedSubclassedNSView instance, and set it as the content view.
Even easier is to do it in IB: Select the window's content view, hit ⌘6 (Identity), and set the view's class to MyFlippedSubclassedNSView.
Upvotes: 8