PicSum : https://picsum.photos/
Effortless Image Loading with AsyncImage in SwiftUI! 🚀
Say goodbye to manual image fetching and third-party libraries—AsyncImage makes loading remote images in SwiftUI simple and efficient! In this video, I’ll show you how to use AsyncImage to fetch and display images from a public API. Learn how to handle loading, success, and failure states, and build a dynamic, scrollable image gallery in no time.
🧐 What You’ll Learn:
• Use AsyncImage to load images from URLs with minimal code.
• Customize loading, success, and failure states for a polished UI.
• Build dynamic galleries using ForEach and ScrollView.
🔥 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 & Project setup
0:29 Creating Navigation to our Async Image View
0:58 Creating AsyncImageView
1:18 Picsum Photos (Public API)
2:02 Adding URL
2:52 Using AsyncImage (handling Cases)
5:39 Quick Code Fix & Testing
7:35 Enhancing the Design
11:09 Caching and AsyncImage Configuration
11:51 Recap & Outro