Skip to content

Instantly share code, notes, and snippets.

//
// ContentView.swift
// ReminderslikeUI
//
// Created by Joseph Wardell on 3/12/25.
//
import SwiftUI
import Observation
// A Simple AppKit NSViewControllerRepresentable to wrap a NSViewCOntroller subclass that presents a NSImageView in a NSScrollVIew.
// This was done more or less for educational purposes for myself, but maybe someone will find it helpful
public struct ImageRepresentable: NSViewControllerRepresentable {
public typealias NSViewControllerType = ImageViewController
let image: NSImage
let minSize: CGSize?
//
// MenuCommandTestsApp.swift
// MenuCommandTests
//
// Created by Joseph Wardell on 8/16/23.
//
import SwiftUI
let SecondWindowIdentifier = "SecondWindowIdentifier"
@jaywardell
jaywardell / ContainerView.swift
Created October 24, 2019 16:23
Creating a View that contains another view builder in SwiftUI
import SwiftUI
struct ContainerView<Content: View>: View {
let content: Content
public init(@ViewBuilder builder: () -> Content) {
self.content = builder()
}