dpearson2699 avatar

Swiftui Uikit Interop

Bridges UIKit and SwiftUI in both directions, wrapping UIKit views and embedding SwiftUI in UIKit screens.

CCM score
73 of 100
skills.sh installs
4.4K
GitHub stars
1.3K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers UIViewRepresentable and UIViewControllerRepresentable wrapping, UIHostingController and UIHostingConfiguration embedding, and coordinator delegate patterns
  • Includes lifecycle guidance for makeUIView, updateUIView, dismantleUIView, and sizeThatFits, plus common mistakes and a review checklist
  • Enforces setting delegates in makeUIView rather than updateUIView, and guards updateUIView against redundant writes that cause update loops
  • Designed for teams wrapping UIKit-only or third-party views in SwiftUI or migrating UIKit apps to SwiftUI incrementally

Install

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

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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

Details

Repository
github.com/dpearson2699/swift-ios-skills
Categories
Mobile Apps, Frontend & UI Code
First seen
Apr 16, 2026

More from dpearson2699/swift-ios-skills

All 94

Similar to Swiftui Uikit Interop

More Mobile Apps