Horizontal ScrollView and Handling Selection
Maps UIKit SwiftUI
Building out a horizontal scrollview carousel mechanism in SwiftUI is surprisingly very easy compared to the UIKit UICollectionView counterpart. I'll first show you how to implement this using ScrollView, HStack, and ForEach loops. Finally once we have our views rendered out as map items, we'll discuss how to properly handle the selection of each block so that the map reacts correctly.

Comments (2)
3 years ago
Just downloaded the project, where was that bit of code that prevents the flashing?
3 years ago
For anyone trying to avoid the deprecation warning use this: UIApplication.shared.windows.first(where: {$0.isKeyWindow})?.endEditing(true)