Resizing NSScrollView/NSClipView to fit NSTableView width
Resizing NSScrollView/NSClipView to fit NSTableView width
- Subject: Resizing NSScrollView/NSClipView to fit NSTableView width
- From: studfed studfed <email@hidden>
- Date: Mon, 15 Aug 2016 20:22:08 +0300
Hi,
I have added NSTableView to xib (which adds scrollview and clipview by
default), without columns.
Columns are generated programmatically with width based on header cell
size. Autolayout is enabled and constraints are defined in IB like |
-20-|[scrollview]-20-|
It looks like
Window
MyView
NSScrollView
ClipView
TableView
The problem is that as soon as columns count grows, table becomes clipped.
The only way to set scrollview/clipview to fit table width, was to set
frameSize of scrollerView's to be equal to tableView frame size like:
[scrollView setFrameSize:[tableView frame].size];
I am not sure if it is the right way to prevent table clipping.
Are there any other options to accomplish this or this one is correct also
?
Thanks
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden