NSTableView with dynamic height

前端 未结 3 601
谎友^
谎友^ 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:51

    Don't know if it may be done using IB only. In my case I use autolayout constraints and change its constant value.

    1. Add height-constraint to parent NSScrollView (may be disable scrolling).
    2. Connect the constraint to the outlet property.
    3. Use constant value when it's needed.

提交回复
热议问题