Post

Replies

Boosts

Views

Activity

Reply to Detecting when the user lifted finger off the screen on a scrollview
Came here with the same question and you were so close! At least in 2026 on Xcode 27 Beta, don't have older versions handy. All you need to do is swap the .gesture() modifier with .simultaneousGesture(): struct TestView: View { var body: some View { ScrollView { VStack(spacing: 0) { Rectangle() .foregroundStyle(.green) .frame(height: 700) } } .simultaneousGesture(DragGesture().onEnded({ _ in print("Drag gesture ended") })) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
3w
Reply to Detecting when the user lifted finger off the screen on a scrollview
Came here with the same question and you were so close! At least in 2026 on Xcode 27 Beta, don't have older versions handy. All you need to do is swap the .gesture() modifier with .simultaneousGesture(): struct TestView: View { var body: some View { ScrollView { VStack(spacing: 0) { Rectangle() .foregroundStyle(.green) .frame(height: 700) } } .simultaneousGesture(DragGesture().onEnded({ _ in print("Drag gesture ended") })) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
3w
Reply to How do I get a tab bar in iOS15 that looks like the one in iOS14?
I'm seeing this in SwiftUI with Map inside of a TabView. Presumably because Map doesn't use a standard scroll view? var body: some View { TabView { Map(coordinateRegion: $region) .ignoresSafeArea() .tabItem { Label("Map", systemImage: "map") } } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’21