NSScrollView containing NSStackView. Why the NSStackView items from bottom to Top?

孤街浪徒 提交于 2019-12-05 08:47:54

By default, NSClipViews (and the base NSView) are not flipped and so coordinates (and scroll view positioning) are relative to the bottom left.

You can subclass NSClipView and override isFlipped to return true. Then in IB, set the clip view of the scroll view to that custom class.

You have your view (the parent of stack view) anchored to parent clip view via leading and bottom anchor. Try using leading and top instead. Note: your stack view itself seems to be aligned properly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!