Skip to content

Instantly share code, notes, and snippets.

@NDCSwift
NDCSwift / SampleMoves2.swift
Created May 16, 2026 19:01
Sample Movies for MacOS Table app from various years
extension Movie {
static let samples: [Movie] = [
Movie(id: .init(), title: "The Godfather", year: 1972, director: "Francis Ford Coppola", genre: .drama, rating: 9.2, watched: true),
Movie(id: .init(), title: "Blade Runner", year: 1982, director: "Ridley Scott", genre: .scifi, rating: 8.1, watched: false),
Movie(id: .init(), title: "Pulp Fiction", year: 1994, director: "Quentin Tarantino", genre: .thriller, rating: 8.9, watched: true),
Movie(id: .init(), title: "The Matrix", year: 1999, director: "Lana Wachowski", genre: .scifi, rating: 8.7, watched: true),
Movie(id: .init(), title: "No Country for Old Men", year: 2007, director: "Coen Brothers", genre: .thriller, rating: 8.2, watched: false),
Movie(id: .init(), title: "Inception", year: 2010, director: "Christopher Nolan", genre: .scifi, rating: 8.8, watched: true),
Movie(id: .init(), title: "Whiplash",
@NDCSwift
NDCSwift / SampleMovies.swift
Created May 16, 2026 18:58
Sample Movies from 2024 for MacOS Table
extension Movie {
static let samples: [Movie] = [
Movie(id: .init(), title: "Dune: Part Two", year: 2024, director: "Denis Villeneuve", genre: .scifi, rating: 8.6, watched: true),
Movie(id: .init(), title: "The Brutalist", year: 2024, director: "Brady Corbet", genre: .drama, rating: 7.9, watched: false),
Movie(id: .init(), title: "Alien: Romulus", year: 2024, director: "Fede Álvarez", genre: .thriller, rating: 7.3, watched: true),
Movie(id: .init(), title: "A Real Pain", year: 2024, director: "Jesse Eisenberg", genre: .drama, rating: 8.1, watched: false),
Movie(id: .init(), title: "Conclave", year: 2024, director: "Edward Berger", genre: .thriller, rating: 7.7, watched: true),
Movie(id: .init(), title: "Nickel Boys", year: 2024, director: "RaMell Ross", genre: .drama, rating: 8.3, watched: false),
Movie(id: .init(), title: "The Substance", year: 2024, di
@NDCSwift
NDCSwift / gist:e1ed4c620f9bd19e3107d8f2563ba6d5
Created May 13, 2026 14:46
Retro Slider Example - SwiftUI
import SwiftUI
struct RetroSlider: View {
@Binding var value: Double
let range: ClosedRange<Double>
let step: Double
var body: some View {
@NDCSwift
NDCSwift / gist:4407f9b0b04660e5beebb26031f0ac90
Created April 19, 2026 18:41
Info.plist gist for Volumetric windows in VsionOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<true/>
<key>UIApplicationPreferredDefaultSceneSessionRole</key>
<string>UIWindowSceneSessionRoleVolumetricApplication</string>
Claude Creates Feature Prompts (Prize Wheel)
PROMPT 1 — Context Brief
You are helping me build a Prize Wheel feature for an iOS app.
Here is the complete scope so you have full context before we write any code:
Feature overview:
- A customisable spinning prize wheel
@NDCSwift
NDCSwift / CLAUDE.md
Created March 4, 2026 18:56
A simple template for Swift 6 and iOS development in Xcode using Agentic coding (Claude or Codex)

Project Context

Overview

  • iOS 26 SwiftUI app targeting iPhone and iPad
  • Minimum deployment: iOS 26
  • Swift 6 with strict concurrency
  • Uses SwiftUI throughout - no UIKit unless absolutely necessary

Architecture

Create a claude.md file for this project. Include: project purpose, key architecture decisions, coding conventions, and how you should approach common tasks like debugging and adding features.

This function [name] should [expected behavior], but currently [actual behavior]. The error is [error message].

Add [feature] to [file]. It should [specific behavior]. Follow our existing pattern in [similar file]. Consider [edge cases]. Update tests in [test file].