Scroll Programmatically with ScrollViewReader in a NavigationLink - iTunes Search API - PART 7/7
Автор: Karin Prater
Загружено: 2022-08-04
Просмотров: 2488
Описание:
In the 7th part of the iTunes Search API tutorial series, we will implement the detail view for songs. This includes programmatically scrolling to the selected song when the detail view appears.
We need to do 2 fetch requests when opening the NavigationLink, which is done with 2 separate view models. These make the code more organised and reusable.
Last I want to change the minimum deployment target back from iOS 16 to 15. Therefore I need to show part of the code conditionally by checking the available iOS version and having an alternative for the Grid view-
Overview
00:00 Introduction
03:14 NavigationLink to Song Detail View
05:27 Song Detail View
5:39 fetching the data for Song Detail View
14:55 Reusable view for Album Header
19:36 Scroll programmatically with ScrollViewReader
33:06 onAppear vs onChange, how to update the UI
38:21 conditionally show views for different iOS versions
43:37 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 file for starting point:
https://github.com/gahntpo/ItunesSear...
⬇️ End:
https://github.com/gahntpo/ItunesSear...
#SwiftUI #AsyncImage
Повторяем попытку...

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