In the 4rd part of this SwiftUI tutorial series, we are going to implement a complex layout. This is a great example of using ScrollView, LazyHStack, LazyHGrid and more. Since there is also a lot of images displayed, we need to take care of loading images lazily when scrolling. Luckily the new AsyncImage takes care of most of the heavy work. We can further customise the loading and error placeholder for the images.
Overview
00:00 Introduction
07:13 adding example data to work with the SwiftUI preview
13:12 Song List View
25:01 Album List View
31:59 Movie List View
37:03 Search All Sections
48:03 Album Section View - horizontal ScrollView with LayzHStack
51:50 Movie Section View
55:04 Song Section View with LazyHGrid
1:00:58 Wrap up
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/ItunesSear...
⬇️ End:
https://github.com/gahntpo/ItunesSear...
PREVIOUS PART: • How to run multiple network requests ...
NEXT PART: • Album Detail View and fetching more d...
#SwiftUI #AsyncImage #layout