Rectangle 27 0

Being flipped only applies its coordinate system to that exact view, not everything down the whole view hierarchy. So whatever you're putting directly into your flipped content view needs to be aware that it's flipped, but nothing else does.

And if you don't want it to work that way, just don't ask for it to be flipped! There's no rule that says that the document view of an NSScrollView has to be flipped, it's just very common for anything with variable-height content to be laid out top to bottom, which is easiest to do in a flipped view. If the layout you're doing works best as bottom-anchored, by all means, keep it unflipped, whatever's easiest. (And anything in Interface Builder should be fine anywaydid you actually see this problem, or are you just speculating that it might happen? I've never seen this issue)

Setting the document view shouldn't change the size of the NSScrollView. You may have something else going on besides just that

Ok. So if I flip my documentView, I need to subclass every view I add, to override their isFlipped method, right? And, I think I will need to keep going the flipped way, because reading from top to bottom is more common, I think if we were scrolling from bottom to top in Pages, it will be weird ^^ Nope, I'm not speculating, I've already flipped my view, and designed it in IB, and it draws everything flipped. Thank you. I'll add some screenshots of the scrollView's resizing problem and the IB view displayed flipped. So if anybody have an idea, viewing it, will be easier to understand it.

objective c - NSScrollView frame and flipped documentView - Stack Over...

objective-c cocoa osx nsscrollview
Rectangle 27 0

The answer is usually to create an NSClipView subclass that returns YES from an override of isFlipped:

objective c - NSScrollView frame and flipped documentView - Stack Over...

objective-c cocoa osx nsscrollview