A better AsyncImage with cache in SwiftUI

Описание к видео A better AsyncImage with cache in SwiftUI

Hello guys!

In a previous video, we saw that the new AsyncImage is not caching images at all,
that's a bummer! 😫

Let's do an experiment and build a better AsyncImage view capable to cache our images in a paginated list.

We will learn A LOT in this video. Enjoy!🍎

Special thanks to ‪@v_pradeilles‬ for the pagination tip! 🙌🏼
Follow him here ➡️   / v_pradeilles  

Content:
0:00 - Intro
0:39 - Explaining the code
3:17 - Implementing Pagination with async/await
4:24 - Is AsyncImage caching images?
5:58 - Implementing CacheAsyncImage
13:41 - Testing CacheAsyncImage
16:15 - Do you want to learn more?


------

Source code showed in the video: https://github.com/pitt500/Pokedex

------
Resources:
AsyncImage: https://developer.apple.com/documenta...
What's new in SwiftUI 3.0:    • What's new in SwiftUI 3.0? #WWDC21  

------
Other videos in the channel:
ViewBuilder:    • Tip: @ViewBuilder in functions  
Closures:    • A quiz about Closures in Swift  
Generics:    • Swift Generics: The Key to Reusable a...  
Protocols with associated types:    • Generics in Swift: Protocols with ass...  
Swift Concurrency:    • Swift Concurrency  


-----
Don't forget to subscribe to the channel, like it, and follow me on social media:

Twitter:
  / swiftandtips  
  / pitt500  

Finally, ask me for a video you would like to see next 😄!

Credits:
Music by Wataboi from https://pixabay.com/
Video edited with LumaFusion

Комментарии

Информация по комментариям в разработке