# วิธีใช้ Code API สำหรับ SwiftUI - การส่งออกและการผสานรวมใน Spline - Spline Academy (https://spline.design/th/academy/tutorials/how-to-use-the-code-api-for-swiftui)

> ด้วย 3D Code API ใหม่สำหรับ SwiftUI คุณผสานฉาก Spline เข้ากับแอป iOS ได้ด้วยโค้ดเพียงไม่กี่บรรทัด

1. [Academy](https://spline.design/th/academy)
2. [คอร์ส](https://spline.design/th/academy/collections)
3. [การส่งออกและการผสานรวมใน Spline](https://spline.design/th/academy/collections/export-integration-in-spline)
4. วิธีใช้ Code API สำหรับ SwiftUI

# วิธีใช้ Code API สำหรับ SwiftUI

บทเรียนที่ 7 จาก 8Spline 3Dระดับสูง5 นาที

ด้วย 3D Code API ใหม่สำหรับ SwiftUI คุณผสานฉาก Spline เข้ากับแอป iOS ได้ด้วยโค้ดเพียงไม่กี่บรรทัด

วันนี้เราจะพาคุณไปดูวิธีเรียกใช้แอ็กชัน แก้ไขคุณสมบัติของวัตถุ และสร้างสภาพแวดล้อม 3D ที่มีชีวิตชีวาและตอบสนองได้ จากโค้ดและอินเทอร์เฟซผู้ใช้ที่คุณมีอยู่แล้วโดยตรง

เรายังเตรียมฉาก Spline และเดโม Xcode ไว้ในเอกสารของ Spline ให้คุณสำรวจรายละเอียดเพิ่มเติมได้โดยตรง

## แหล่งข้อมูลที่เกี่ยวข้อง

- [Heart Code API SwiftUIเทมเพลต](https://app.spline.design/academy/tutorials/how-to-use-the-code-api-for-swiftui?redirect-duplicate-template-uuid=e931d2f0-d7f0-4285-a983-b2c54362c899&is-2d-file=false)
- [Native 3D Embeds for iOSเอกสาร](https://docs.spline.design/exporting-your-scene/apple-platform/native-3d-embeds-for-i-os)
- [Code API for SwiftUIเอกสาร](https://docs.spline.design/exporting-your-scene/apple-platform/code-api-for-swift-ui)

## ภาพรวม

- Spline 3D
- 5 นาที
- ระดับสูง

## ถัดไป

[วิธีส่งออก 3D แบบเนทีฟสำหรับ Android12 นาทีระดับกลาง](https://spline.design/th/academy/collections/export-integration-in-spline/how-to-export-native-3d-for-android)[ไปต่อ](https://spline.design/th/academy/collections/export-integration-in-spline/how-to-export-native-3d-for-android)

[Spline](https://spline.design/th)

เอดิเตอร์ 3D และ 2D สำหรับทีมและเอเจนต์ของทีม เผยแพร่ได้ทั้งบนเว็บ iOS และ Android

#### ถาม AI เกี่ยวกับ Spline

#### ผลิตภัณฑ์

- [ออกแบบ 3D](https://spline.design/th/3d-design)
- [Hana](https://spline.design/th/hana)
- [Omma](https://omma.build)
- [สร้าง 3D ด้วย AI](https://spline.design/th/ai-generate)
- [Spline MCP](https://spline.design/th/mcp)
- [Spline Arena](https://spline.design/th/arena)
- [ราคา](https://spline.design/th/pricing)
- [องค์กร](https://spline.design/th/enterprise)

#### รันไทม์

- [Web](https://spline.design/th/web)
- [iOS](https://spline.design/th/ios)
- [Android](https://spline.design/th/android)

#### แอป

- [ดาวน์โหลด](https://spline.design/th/download)
- [Spline Mirror](https://spline.design/spline-mirror)
- [ดาวน์โหลด Spline Mirror](https://spline.design/download-mirror)

#### เรียนรู้

- [Docs](https://docs.spline.design/)
- [Academy](https://spline.design/th/academy)
- [Spline API](https://www.npmjs.com/package/@splinetool/runtime)
- [โซลูชัน](https://spline.design/solutions)

#### คอมมูนิตี้

- [คอมมูนิตี้ Spline](https://community.spline.design)
- [Blog](https://spline.design/th/blog)
- [มีอะไรใหม่](https://spline.design/th/changelog)
- [การศึกษา](https://spline.design/th/education)
- [Contra](https://spline.design/contra)
- [พันธมิตร](https://spline.design/th/affiliate)

#### บริษัท

- [ลูกค้า](https://spline.design/th/customers)
- [ร่วมงานกับเรา](https://www.ycombinator.com/companies/spline/jobs)
- [ความปลอดภัย](https://spline.design/th/security)

#### กฎหมาย

- [ข้อกำหนดและเงื่อนไข](https://spline.design/terms)
- [ความเป็นส่วนตัว](https://spline.design/privacy)

#### ติดต่อ

- [help@spline.design](mailto:help@spline.design)
- [jobs@spline.design](mailto:jobs@spline.design)

© 2026 - Spline, Inc.
