SwiftUI Down Tapped
struct DownTapGestureExample: View {
var body: some View {
Circle()
.frame(width: 100, height: 100, alignment: .center)
.onTouchDownGesture {
// Event
}
}
}
struct DownTapGestureExample: View {
@State private var location: CGPoint = .zero
var body: some View {
Circle()
.fill(self.location.y > 50 ? Color.blue : Color.red)
.frame(width: 100, height: 100, alignment: .center)
.onTouchDownGesture { location in
self.location = location
}
}
}
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift
compiler.
Once you have your Swift package set up, adding Alamofire as a dependency is as easy as adding it to the dependencies
value of your Package.swift
.
dependencies: [
.package(url: "https://github.com/swift-man/OnTouchDownGesture.git", .branch: "main")
]
link |
Stars: 0 |
Last commit: 3 weeks ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics