Created
August 7, 2020 15:41
-
-
Save brunophilipe/c1d86fda7fdba90d31457a51a3ae96c6 to your computer and use it in GitHub Desktop.
NoInsetsTableView.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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