dpearson2699 avatar

Swiftui Uikit Interop

A practical reference for moving between SwiftUI and UIKit when you need camera controllers, document scanners, attributed text, or any of the hundred UIKit components still missing native SwiftUI equivalents. The guide walks through UIViewRepresentable and UIViewControllerRepresentable with clear lifecycle tables showing when makeUIView versus updateUIView fires, plus coordinator patterns for delegate callbacks. Targets iOS 26 with Swift 6.3 but notes backward compatibility to iOS 16. Most valuable for the state synchronization patterns and the common mistakes section, since getting binding updates to flow correctly across the framework boundary is where most interop bugs live. Good for incremental migrations or just wrapping that one UIKit view you can't replace yet.

skills.sh installs
4.2K
GitHub stars
1.3K
last updated
Aug 21, 2026

Install

$ npx -y skills add dpearson2699/swift-ios-skills --skill swiftui-uikit-interop --agent claude-code

Installs into .claude/skills of the current project.

Files

SwiftUI-UIKit Interop

Bridge UIKit and SwiftUI in both directions: wrap UIKit views and controllers, embed SwiftUI in UIKit screens, and synchronize state without duplicating lifecycle ownership.

See references/representable-recipes.md for complete wrapping recipes and references/hosting-migration.md for UIKit-to-SwiftUI migration patterns.

Contents

UIViewRepresentable Protocol

Use UIViewRepresentable to wrap any UIView subclass for use in SwiftUI.

Required Methods

Sponsors

Details

Repository
github.com/dpearson2699/swift-ios-skills
Categories
AI & Agent Building, Mobile Development, Office & Documents
First seen
Apr 16, 2026

More from dpearson2699/swift-ios-skills

All 98
1upstash avatarupstashupstash/skillsWork with any Upstash TypeScript/JavaScript SDK including Redis, Box, QStash, Workflow, Vector, Search and Ratelimit. Use when the user is working with any Upst4.2Kskills.sh installs
2sanyuan0704 avatarskill-forgesanyuan0704/sanyuan-skillsCreate high-quality, production-grade skills for Claude Code. Expert guidance on skill architecture, workflow design, prompt engineering, and packaging. Use whe4.2Kskills.sh installs
3dotnet avatarcreate-skilldotnet/skillsScaffolds new agent skills for the dotnet/skills repository. Use when creating a new skill, generating SKILL.md files, writing a skill description that the runt4.2Kskills.sh installs
4asksurf-ai avatarsurfasksurf-ai/surf-skillsYour AI agent's crypto brain. One skill, 100+ commands across 14 data domains — real-time prices, wallets, DeFi, on-chain SQL, prediction markets, and more. Nat4.2Kskills.sh installs
5assistant-ui avatarcopilotsassistant-ui/skillsGrounding an assistant in your app with assistant-ui copilots (@assistant-ui/react). Use when steering assistant behavior with useAssistantInstructions, feeding4.1Kskills.sh installs
6getpaseo avatarpaseo-advisorgetpaseo/paseoSpin up a single agent as an advisor — second opinion on the current task. Use when the user says "advisor", "second opinion", "what does X think", or wants an 4.1Kskills.sh installs