Skip to content

Instantly share code, notes, and snippets.

@lhoward
Created October 30, 2020 06:36
Show Gist options
  • Select an option

  • Save lhoward/206fcde4fada7ffae556ab9301cd63c9 to your computer and use it in GitHub Desktop.

Select an option

Save lhoward/206fcde4fada7ffae556ab9301cd63c9 to your computer and use it in GitHub Desktop.
import SwiftUI
private struct ScrollableModifier: ViewModifier {
func body(content: Content) -> some View {
ScrollView {
content
}
}
}
extension View {
public func scrollable() -> some View {
return self.modifier(ScrollableModifier())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment