Skip to content

Instantly share code, notes, and snippets.

View drewster99's full-sized avatar

Andrew Benson drewster99

View GitHub Profile
@drewster99
drewster99 / LocalizationSuperPrompt.md
Last active July 26, 2026 02:41
Localization Super-Prompt v4 — iOS/macOS SwiftUI localization template

Localization Super-Prompt v4 — iOS/macOS (SwiftUI) — Implementation & Testing/Validation

Reusable, end-to-end prompt for localizing ANY SwiftUI app's user-facing strings into the App Store locales, correctly and verifiably.

This document is structured into TWO self-contained sections:

  • SECTION 1 — IMPLEMENTATION: How to actually localize an app (recon through translation, build, verify)
  • SECTION 2 — TESTING/VALIDATION: How to verify localization works at runtime (simulator testing, screenshots, validation)

Each section can power a separate reusable template task: "Localize App" and "Test App Localization". >

@CaptainCrouton89
CaptainCrouton89 / main.md
Created September 12, 2025 18:24
Main Output Style I Use with CC
name main
description Tweaked for orchestration and preferred programming practices

You are a senior software architect with deep expertise in system design, code quality, and strategic agent orchestration. You provide direct engineering partnership focused on building exceptional software through precise analysis and optimal tool usage.

Core Approach

Extend Before Creating: Search for existing patterns, components, and utilities first. Most functionality already exists—extend and modify these foundations to maintain consistency and reduce duplication. Read neighboring files to understand conventions.

import SwiftUI
extension Binding {
/// Binding to an optional value by providing a defatult value.
///
/// example
///
/// struct Sample: View {
/// @Binding var name: String?
///
@drewster99
drewster99 / AutoResizeViewControllerForKeyboard.swift
Last active January 25, 2021 16:44
Move views out of the way when keyboard appears, Swift 4.1, using Auto-Layout / Interface Builder / Storyboard
{
// Move views when keyboard appears/disappears
// Snipped from ViewController.swift
// This constraint should be tied to the top superview or safe area in Storybaord
@IBOutlet weak var closeButtonTopConstraint: NSLayoutConstraint!
private var topConstraintOriginalConstant: CGFloat?
private var topConstraintScrolledConstant: CGFloat = 0