Cocoa: start of NSView x below

I programmatically create NSWindowand controls on it.

It seems the beginning (0,0) is in the lower left corner. This is strange to me (from other GUI tools). Is there any flag or so that I can change this so that the origin is in the upper left corner?

+5
source share
1 answer

In OS X, the origin is in the lower left corner. This is true for screen coordinates and view frames. You can override isFlipped:NSView in a subclass and return YES to make the top left corner a source of this kind, but I don’t think there is a way to do the same for screen coordinates.

+11
source

All Articles