This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
/// SwiftUI implementation of a responsive-feeling scrollview with tappable tiles. | |
/// We use a custom UIScrollView via UIViewRepresentable and a UIView tap overlay to | |
/// get around current SwiftUI issues with simultaneous gesture recognition and allow | |
/// the tiles to respond instantly to presses while scrolling. | |
struct ContentView: View { | |
@State private var showSheet = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ScaledButtonStyleTest: ButtonStyle { | |
func makeBody(configuration: Configuration) -> some View { | |
configuration.label | |
.scaleEffect(configuration.isPressed ? 0.2 : 1.0) | |
.animation( | |
.spring(response: 0.2, dampingFraction: 1), | |
value: configuration.isPressed | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ScaledButtonStyleTest: ButtonStyle { | |
func makeBody(configuration: Configuration) -> some View { | |
configuration.label | |
.scaleEffect(configuration.isPressed ? 0.2 : 1.0) | |
.animation( | |
.spring(response: 0.2, dampingFraction: 1), | |
value: configuration.isPressed | |
) |