0

I would like to "pimp" my table view header It should get a height of 60.0.

I tried this:

myTableView.headerView!.frame.size.height = 60

It will be higher, but the "content" will keep the same size:

enter image description here

Trombone0904
  • 4,132
  • 8
  • 51
  • 104

1 Answers1

0

I will suggest assign frame instead of height.

 NSRect frame = tableView.headerView.frame;
frame.size.height = 26;
tableView.headerView.frame = frame;
  • this will be the same result like my picture shows :( – Trombone0904 Sep 13 '17 at 12:33
  • if u want to resize your content as per height and you are using autolayout then use `layoutSubviews()` on headerview. And if you are using hardcoded frames while creating headerview subviews then you need to resize them all manually. – Aura Abhishek Sep 13 '17 at 13:27
  • `@IBOutlet weak var x: NSTableHeaderView! x.frame.size.height = 60; x.layoutSubtreeIfNeeded();` I tried this. but it doesn't work. what do i wrong? – Trombone0904 Sep 13 '17 at 15:42