Automatically resize NSTabView to fit content view
I have a NSTabView with a number of NSView items. I want to resize the tab view so that the displayed view always fits snugly within the tab view.
I've tried a number of variations of setF开发者_如何转开发rame within the tabView's delegate didSelectTabViewItem and shouldSelectTabViewItem but can't seem to get it to work. I think I have to change the size of the tabView's contentRect, but this seems to be readonly.
Can anyone please give me a quick pointer to perhaps where this has been done before (I'm having no luck with Google).
Thanks,
John
Ok I finally got it:
In Xcode (.xib editor), check the Resize box
of the container windowClick on the "tabView" and check this
hereAt last simply adapt its resizing rules in the Size Inspector, that is!
精彩评论