![]() ![]() Of course ScrollViewReader doesn't wrap tContentOffset and only offers scrollTo(_ id: Hashable ), that doesn't let me control the offset as I would like to. Start by creating the List, using a ForEach to iterate over the partments array, and then create Section views for each department. The basic idea is that I have a slider and a ScrollView, and moving the slider around lets me scroll through the ScrollView content (which is not necessarily a video as shown in the above example, it can be any view). For the space between the navigation bar link and title, it looks like you are nesting NavigationView items inside each other. You provide it an array of items, and you may also need to tell SwiftUI how it can identify each of your items uniquely so it knows how to update them when values change. 1 As Asperi points out in the links in his comment, you can use VStack (spacing: 0) to remove the space between the Form and List. I'm trying to implement this kind of functionality in SwiftUI. ForEach in SwiftUI is a view struct in its own right, which means you can return it directly from your view body if you want.
0 Comments
Leave a Reply. |