Question

I've got a IKImageBrowserView in an NSScrollView and I want to lay it out so it only scrolls from left to right.

By default the IKImageBrowserView lays out the images in a grid and the width is being correctly constrained but it's always increasing the height to fit the number of rows of images it's containing.

My naive approach to this has been to try setting the IKImageBrowserView's and NSScrollView's frames so the height is the equivalent of 1 row of images, but this had no effect.

Can anyone recommend the correct way to approach to this?

Was it helpful?

Solution

No sooner do I ask the question and I find the answer:

[imageBrowser setContentResizingMask:NSViewWidthSizable];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top