Skip to content

Instantly share code, notes, and snippets.

@brunophilipe
Created August 7, 2020 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brunophilipe/c1d86fda7fdba90d31457a51a3ae96c6 to your computer and use it in GitHub Desktop.
Save brunophilipe/c1d86fda7fdba90d31457a51a3ae96c6 to your computer and use it in GitHub Desktop.
NoInsetsTableView.swift
//
// NoInsetsTableView.swift
// Mastonaut
//
// Created by Bruno Philipe on 04.07.20.
// Copyright © 2020 Bruno Philipe. All rights reserved.
//
import Foundation
class NoInsetsTableView: NSTableView {
override func awakeFromNib() {
super.awakeFromNib()
if #available(OSX 11.0, *), let clipView = enclosingScrollView?.contentView {
clipView.automaticallyAdjustsContentInsets = false
clipView.contentInsets.top = -10
clipView.contentInsets.left = -16
clipView.contentInsets.right = -16
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment