How can I center my DocumentView
(witch is subclass of NSOpenGLView) at NSScrollView
?
Now it looks like this (gray area is NSScrollView bounds):
And I want it to look something like this:
Subclass NSClipView
and override -constrainBoundsRect:
to return the centered rect. This is discussed at the the 45:30 mark in the fantastic presentation from WWDC 2013 - Session 215: Optimizing Drawing and Scrolling on OS X
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