Skip to content

Instantly share code, notes, and snippets.

@gonsolo
gonsolo / Worst01.swift
Created May 29, 2019 15:56
The worst of the worst, part I
func a() {
print("a")
}
func b() {
print("b")
}
func c() {
print("c")
@gonsolo
gonsolo / HelloWindow.swift
Last active April 21, 2022 18:13
Swift 4 macOS Window Hello World
// Hello World Window macOS Swift 4: Creates an empty window
import AppKit
let nsapp = NSApplication.shared
let rect = NSMakeRect(0, 0, 200, 200)
if #available(macOS 10.10, *) {
let window = NSWindow(contentRect: rect,
styleMask: .fullSizeContentView,
backing: NSWindow.BackingStoreType.buffered,