·swiftui-uikit-interop
</>

swiftui-uikit-interop

橋接 UIKit 和 SwiftUI — 使用 UIViewRepresentable/UIViewControllerRepresentable 將 UIKit 視圖/視圖控制器包裝在 SwiftUI 中,使用 UIHostingController 將 SwiftUI 嵌入 UIKit 中,並處理 Coordinator 委託模式。將相機預覽、地圖視圖、Web 視圖、郵件撰寫、文件掃描器、PDF 渲染器、具有屬性文字的文字視圖或任何第三方 UIKit SDK 整合到 SwiftUI 應用程式中時使用。當將 UIKit 應用程式增量遷移到 SwiftUI 時,或需要本機 SwiftUI 中尚未提供的 UIKit 功能時,也可以使用。

97安裝·29熱度·@dpearson2699

安裝

$npx skills add https://github.com/dpearson2699/swift-ios-skills --skill swiftui-uikit-interop

如何安裝 swiftui-uikit-interop

透過命令列快速安裝 swiftui-uikit-interop AI 技能到你的開發環境

  1. 開啟終端機: 開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等)
  2. 執行安裝指令: 複製並執行以下指令:npx skills add https://github.com/dpearson2699/swift-ios-skills --skill swiftui-uikit-interop
  3. 驗證安裝: 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

來源:dpearson2699/swift-ios-skills。

SKILL.md

查看原文

Bridge UIKit and SwiftUI in both directions. Wrap UIKit views and view controllers for use in SwiftUI, embed SwiftUI views inside UIKit screens, and synchronize state across the boundary. Targets iOS 26+ with Swift 6.2 patterns; notes backward-compatible to iOS 16 unless stated otherwise.

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

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

橋接 UIKit 和 SwiftUI — 使用 UIViewRepresentable/UIViewControllerRepresentable 將 UIKit 視圖/視圖控制器包裝在 SwiftUI 中,使用 UIHostingController 將 SwiftUI 嵌入 UIKit 中,並處理 Coordinator 委託模式。將相機預覽、地圖視圖、Web 視圖、郵件撰寫、文件掃描器、PDF 渲染器、具有屬性文字的文字視圖或任何第三方 UIKit SDK 整合到 SwiftUI 應用程式中時使用。當將 UIKit 應用程式增量遷移到 SwiftUI 時,或需要本機 SwiftUI 中尚未提供的 UIKit 功能時,也可以使用。 來源:dpearson2699/swift-ios-skills。

可引用資訊

為搜尋與 AI 引用準備的穩定欄位與指令。

安裝指令
npx skills add https://github.com/dpearson2699/swift-ios-skills --skill swiftui-uikit-interop
分類
</>開發工具
認證
收錄時間
2026-03-08
更新時間
2026-03-11

Browse more skills from dpearson2699/swift-ios-skills

快速解答

什麼是 swiftui-uikit-interop?

橋接 UIKit 和 SwiftUI — 使用 UIViewRepresentable/UIViewControllerRepresentable 將 UIKit 視圖/視圖控制器包裝在 SwiftUI 中,使用 UIHostingController 將 SwiftUI 嵌入 UIKit 中,並處理 Coordinator 委託模式。將相機預覽、地圖視圖、Web 視圖、郵件撰寫、文件掃描器、PDF 渲染器、具有屬性文字的文字視圖或任何第三方 UIKit SDK 整合到 SwiftUI 應用程式中時使用。當將 UIKit 應用程式增量遷移到 SwiftUI 時,或需要本機 SwiftUI 中尚未提供的 UIKit 功能時,也可以使用。 來源:dpearson2699/swift-ios-skills。

如何安裝 swiftui-uikit-interop?

開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等) 複製並執行以下指令:npx skills add https://github.com/dpearson2699/swift-ios-skills --skill swiftui-uikit-interop 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

這個 Skill 的原始碼在哪?

https://github.com/dpearson2699/swift-ios-skills