Loading and caching images from URL in SwiftUI - AsyncImage or custom view model logic
Автор: Karin Prater
Загружено: 2021-08-25
Просмотров: 11067
Описание:
In this tutorial I will show you how to load images from an URL. First, I will use AsyncImage, which was added for SwiftUI this year for iOS 15. You will learn different implementation including loading and error states. I will also show an example for a custom loading view. This allows for more control.In order to improve the optimisation of the loading, I will talk about caching the images. This helps to lower the data consumption.
Overview
00:00 introduction
01:18 AsyncImage for iOS 15+
08:44 custom image view with image loading
20:56 performance optimisation with caching
27:12 bad example for loading images lazy
33:19 wrap up
😻 The example API is the cat API.https://thecatapi.com/
🤩 Learn more
Part 1: working with the Web, HTTP, JSON, and REST APIs • iOS Swift Tutorial: Working with the Web: ...
Part 2: Parsing JSON • iOS Swift Tutorial - Working with the Web ...
Part 3: Networking in SwiftUI • SwiftUI Tutorial: How to make a API call, ...
If you liked what you learned and you want to see more, check out one of my courses!
👨💻 my SwiftUI course https://school.swiftyplace.com/course...
👨💻 my Core Data and SwiftUI course https://school.swiftyplace.com/course...
👩🏻💻 Combine course
https://school.swiftyplace.com/course...
⬇️ Project starter files: https://github.com/gahntpo/CatAPISwiftUI
#SwiftUI #AsyncImage
Повторяем попытку...

Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: