Skip to content

Instantly share code, notes, and snippets.

View ThatsJustCheesy's full-sized avatar

Ian Gregory ThatsJustCheesy

View GitHub Profile
@ThatsJustCheesy
ThatsJustCheesy / PreferencesViewController.swift
Last active August 30, 2019 21:14 — forked from mminer/PreferencesViewController.swift
NSTabViewController for preferences window that resizes itself to fit activated tab view.
// Thanks to mminer on GitHub
// https://gist.github.com/mminer/caec00d2165362ff65e9f1f728cecae2
import Cocoa
class PreferencesViewController: NSTabViewController {
private lazy var tabViewSizes: [NSTabViewItem: NSSize] = [:]
private var lastSelectedTabViewItem: NSTabViewItem? = nil
@ThatsJustCheesy
ThatsJustCheesy / KSImageView.h
Last active August 18, 2018 23:40 — forked from vigorouscoding/KSImageView.h
Forked from @vigorouscoding 's original and modernized. NSImageView subclass to get the filename of the dropped image and to disable deleting and cutting the image. The class sends a "KSImageDroppedNotification" with the image filename in the userinfo dictionary. vigorouscoding got the idea from: http://www.cocoabuilder.com/archive/cocoa/121824-…
#import <Cocoa/Cocoa.h>
@interface KSImageView : NSImageView
@end