Setting IKImageBrowserView to one long row
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 IKImageBrowse开发者_如何学JAVArView
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?
No sooner do I ask the question and I find the answer:
[imageBrowser setContentResizingMask:NSViewWidthSizable];
精彩评论