0Pricing
SwiftUI Academy · บทเรียน

การติดตั้ง Xcode และสร้างโครงการ

ตั้งค่า Xcode และสร้างเทมเพลตแอป SwiftUI ใหม่

การติดตั้ง Xcode และสร้างโครงการ เป็นบทเรียน SwiftUI Academy ฟรีบน CoddyKit นี่คือบทเรียนที่ 1 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน SwiftUI Academy และความก้าวหน้าของคุณจะซิงค์ข้ามเว็บและแอป CoddyKit คอร์ส SwiftUI Academy มีบทเรียนทั้งหมด 4 บทเรียน

บางส่วนของบทเรียนนี้ยังไม่ได้รับการแปล และแสดงเป็นภาษาอังกฤษ

Meet Xcode

To build iOS apps you need Xcode, Apple's free app for writing, running, and shipping software. It is your home base for everything SwiftUI. 🛠️

You Need a Mac

Xcode runs only on macOS. You build, preview, and test iOS apps right on your Mac, so a recent macOS version is the one real requirement here.

Get It Free

Open the Mac App Store, search for Xcode, and install it. It is a large download, so grab a coffee while it sets up the iOS tools for you. ☕

First Launch

The first time you open Xcode it installs command line tools and simulators. Let it finish once, and future launches will be quick.

Start a New Project

From the welcome window choose Create a new Xcode project. This wizard scaffolds a complete, runnable app for you in just a few clicks.

Pick the App Template

Under the iOS tab, select the App template. It is the standard starting point for a normal SwiftUI iPhone app.

Name Your App

Enter a Product Name like MyFirstApp. This becomes your app's display name and the name of the project folder Xcode creates.

Choose SwiftUI

Set the Interface option to SwiftUI, not Storyboard. This tells Xcode you want to design your screens with Swift code and live previews.

Save the Project

Pick a folder and click Create. Xcode generates a working app and opens it in the project navigator on the left side of the window.

Find ContentView

In the navigator, open ContentView.swift. This is the file holding your app's first screen, and the place you will edit next.

struct ContentView: View {
    var body: some View {
        Text("Hello, world!")
    }
}

Hello, World!

That generated Text view shows the classic Hello, world! message. You already have a real, runnable app before writing a single line yourself. 🎉

Quick Check

When creating the project, which Interface option do you pick for SwiftUI?

Recap

You installed Xcode, created an App project with the SwiftUI interface, and opened ContentView. Your first iOS app is ready to run. 🚀

คำถามที่พบบ่อย

บทเรียน “การติดตั้ง Xcode และสร้างโครงการ” ฟรีหรือไม่

ใช่ — ข้อความเต็มของ “การติดตั้ง Xcode และสร้างโครงการ” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส SwiftUI Academy ให้อัปเกรดเป็น CoddyKit PRO คอร์ส SwiftUI Academy มีบทเรียนทั้งหมด 4 บทเรียน

คุณจะเรียนรู้อะไรในบทเรียน “การติดตั้ง Xcode และสร้างโครงการ”

ตั้งค่า Xcode และสร้างเทมเพลตแอป SwiftUI ใหม่ คุณปฏิบัติ SwiftUI Academy ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน

คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน SwiftUI Academy หรือไม่

ไม่จำเป็นต้องมีประสบการณ์มาก่อน SwiftUI Academy บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 1 จากทั้งหมด 4 บทเรียน

บทเรียน “การติดตั้ง Xcode และสร้างโครงการ” ใช้เวลานานแค่ไหน

บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย

ฉันเขียนและรันโค้ดในบทเรียน SwiftUI Academy นี้ได้ไหม

ได้ บทเรียน SwiftUI Academy ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ

บทเรียนทั้งหมดในหลักสูตรนี้

  1. การติดตั้ง Xcode และสร้างโครงการ
  2. ส่วนประกอบของไฟล์แอป SwiftUI
  3. ผืนผ้าใบแสดงตัวอย่างแบบสด
  4. การเรียกใช้บนตัวจำลองและอุปกรณ์
← กลับไปที่ SwiftUI Academy