Skip to content

Instantly share code, notes, and snippets.

View rchrd2's full-sized avatar

Richard Caceres rchrd2

View GitHub Profile
@chriseidhof
chriseidhof / boilerplate.swift
Last active September 27, 2025 12:39
QuickMacApp
// Run any SwiftUI view as a Mac app.
import Cocoa
import SwiftUI
NSApplication.shared.run {
VStack {
Text("Hello, World")
.padding()
.background(Capsule().fill(Color.blue))
@xenodium
xenodium / boilerplate.swift
Last active May 20, 2023 06:02 — forked from chriseidhof/boilerplate.swift
QuickMacApp
// Run any SwiftUI view as a Mac app.
// Based on https://gist.github.com/chriseidhof/26768f0b63fa3cdf8b46821e099df5ff
import Cocoa
import SwiftUI
NSApplication.shared.run {
VStack(spacing: 0) {
Rectangle().fill(Color.green)
Rectangle().fill(Color.yellow)