SwiftUI Async Image tutorial - Learn how to load images asynchronously from the Internet in Xcode

preview_player
Показать описание
🟢 LIMITED TIME OFFER - SAVE 37%
Practical iOS and macOS app development tutorials with SwiftUI in 4K

In this practical SwiftUI tutorial, we will learn how to load and display an image asynchronously from the Internet. Learn how to use Async Image in SwiftUI 3 framework in Xcode. Note that the SwiftUI #AsyncImage view uses the shared URL Session instance to load an image from a specified URL and then display it on the iPhone's screen.

CHAPTERS

00:00 Introduction
00:59 AsyncImage basics
02:48 AsyncImage scale
04:10 Custom placeholder
06:41 Image extension
08:57 AsyncImage phase
11:42 Testing the AsyncImage phases
12:34 AsyncImagePhase enum
15:51 Animation with AsyncImage
17:16 Testing the application
18:54 Wrap up

Until the remote image loads, the view displays either a standard or a custom-built placeholder.

To gain more control over the loading process, we can use the initializer, which takes a content closure that receives an Async Image Phase to indicate the state of the loading operation.

By doing that, we can control what to display on the screen.

In a nutshell, we can return a view that's appropriate for the current phase, such as success, failure, or empty phase.

Alright!

Without further ado, let's create a new project in Xcode and start coding for iPhone and iPad devices.

This SwiftUI tutorial is part of the best online SwiftUI Masterclass course.

#SwiftUI #Xcode #iOSDevelopment #iPhone
Рекомендации по теме
Комментарии
Автор

What kind of iPhone app would you like to see in future videos? Tell me what sort of SwiftUI project are you interested in most. Until then, happy coding!

RobertPetras
Автор

what a quality. I love your video concept. it is so attractive. Thank you for all of them

veyselbozkurt