Skip to content

Instantly share code, notes, and snippets.

@AbodiDawoud
Last active December 28, 2025 23:04
Show Gist options
  • Select an option

  • Save AbodiDawoud/80a5c4c32bd7aab3a6a854eb38830f7e to your computer and use it in GitHub Desktop.

Select an option

Save AbodiDawoud/80a5c4c32bd7aab3a6a854eb38830f7e to your computer and use it in GitHub Desktop.
macOS 15+
import SwiftUI
struct OrbitalColorView: NSViewRepresentable {
func makeNSView(context: Context) -> some NSView {
let cls = NSClassFromString("AppKit.OrbitalColorView") as! NSView.Type
let view = cls.init(frame: .zero)
view.translatesAutoresizingMaskIntoConstraints = false
return view
}
func updateNSView(_ nsViewController: NSViewType, context: Context) {}
}
struct NSLivingColorView: NSViewRepresentable {
func makeNSView(context: Context) -> some NSView {
let cls = NSClassFromString("AppKit.NSLivingColorView") as! NSView.Type
let view = cls.init(frame: .zero)
view.translatesAutoresizingMaskIntoConstraints = false
return view
}
func updateNSView(_ nsViewController: NSViewType, context: Context) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment