I just started with my first Mac App, but I realised that the coordinate-system is "flipped" (x = 0, y = 0 is in the lower left corner). I'm having a lot of trouble with UI programming because I'm used to the iOS coordinate-system.
My Question now is: Can I flip the coordinate-system of my App/Window forever so that I don't have to flip all my subviews also.
Thats my App: My apps window contains a NSScrollView with posts from recent to old. When I add my first post I want it to be right at the top of the scrollView.
I hope someone had the same problem and can help me out. Thanks
You can do a override of the method called - (BOOL)isFlipped
in your NSView classes. Make it to return YES
to get the iOS like coordinate system(AKA flipped). By default it returns NO, just like what you see now. Do so will also solve your second problem because the coordinates are flipped.
you can change it programatically as TonyD has suggested or via interface builder in size inspector using origin pane
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With