Gestures | SwiftUI | Xcode Tutorial

Опубликовано: 22 Январь 2025
на канале: NDC
52
4

Swipeable Cards with SwiftUI Gestures – Drag, Tap, and Swipe 🚀

Learn how to make your SwiftUI apps interactive and fun with gestures! In this tutorial, we’ll cover SwiftUI’s tap, drag, and long press gestures, and combine them to create a Tinder-like swipeable card stack.

What You’ll Learn:

Add Tap and Long Press Gestures for simple interactivity.
Use Drag Gestures to move and swipe UI elements.
Build a Swipeable Card Stack to like or dislike items dynamically.
Perfect for developers looking to add interactivity and gestures to their SwiftUI apps!

🔥 Download My Project Files & More! 🔥
👉 Get the source code for this project & other Swift resources here:
🔗 https://ndcswift.github.io/Swift-Proj...
Subscribe for more bite-sized lessons and full tutorials on Swift, SwiftUI, and UIKit.

Links:
Xcode: https://developer.apple.com/xcode/
Swift Documentation: https://www.swift.org/documentation/


Timestamps:
0:00 Introduction
1:08 State Variables
1:40 Tap Gestures
2:59 Long Press
5:11 Draggable
9:10 Card Stack Example
17:57 Testing and Wrap up