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

เส้นโค้งจังหวะแบบสปริงและกำหนดเอง

ปรับแต่งการเคลื่อนไหวด้วยสปริงและการผ่อนจังหวะ

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

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

The Feel of Motion

How an animation accelerates and settles shapes its personality. The timing curve decides whether motion feels snappy, smooth, or bouncy.

Linear Is Constant

A linear curve moves at one steady speed start to finish. It can feel mechanical, so it suits progress bars more than UI.

.animation(.linear, value: x)

Ease In and Out

The easeInOut curve starts slow, speeds up, then slows to a gentle stop, the most natural choice for most UI.

.animation(.easeInOut, value: x)

Ease In vs Ease Out

Use easeIn to start gently and easeOut to stop gently, picking which end of the motion feels softer.

Meet Springs

A spring animation models real physics, overshooting slightly and settling, which feels lively and responsive.

.animation(.spring, value: x)

Tune the Bounce

The bounce parameter sets how springy the motion is. Zero is smooth; higher values add a playful overshoot.

.spring(duration: 0.5, bounce: 0.3)

Response and Damping

Springs can also be tuned with response for speed and damping for how quickly the bounce dies out.

.interpolatingSpring(
    stiffness: 170, damping: 15)

Custom Bezier Curves

For full control, timingCurve lets you define a custom bezier with your own control points and duration.

.timingCurve(0.2, 0.8, 0.2, 1,
    duration: 0.5)

Add a Delay

Chain .delay onto any animation to wait before it begins, perfect for staggering several elements.

.animation(.spring.delay(0.1), value: x)

Repeat the Motion

Use repeatForever or repeatCount to loop an animation, ideal for pulsing dots and loading hints.

.easeInOut.repeatForever(
    autoreverses: true)

Speed It Up or Down

The .speed modifier scales an animation faster or slower without rewriting its curve or duration.

.animation(.default.speed(2), value: x)

Quick Check

Which curve gives the most natural everyday UI motion?

Recap: Curves and Springs

You explored timing curves from linear to easeInOut, lively springs with bounce, custom beziers, delays, and repeats. Now your motion has personality. 🚀

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

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

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

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

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

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

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

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

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

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

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

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

  1. แอนิเมชันโดยนัย
  2. แอนิเมชันชัดแจ้งด้วย withAnimation
  3. ทรานซิชันการเพิ่มและนำออก
  4. เส้นโค้งจังหวะแบบสปริงและกำหนดเอง
← กลับไปที่ SwiftUI Academy