NSTableView with dynamic height

前端 未结 3 594
谎友^
谎友^ 2021-01-22 03:03

I am working on Xcode 6.1.1 on OSX 10.10.2

How do I make my table adjust its height, so that the height of table would always be equal to the sum of heights of all the r

3条回答
  •  渐次进展
    2021-01-22 03:41

    It should work to constrain the table view to its superview (the clip view) with top and bottom constraints. You don't have to manually adjust the height or any constraint's constant. It should be automatic (the table view will size itself; that will force the clip view to be big enough to contain the table view; that will force the scroll view to be big enough to contain the clip view; etc.).

提交回复
热议问题