Swiftpack.co - swift-man/OnTouchDownGesture as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by swift-man.
swift-man/OnTouchDownGesture 0.6.0
SwiftUI Down Tapped
⭐️ 0
🕓 1 year ago
iOS macOS watchOS
.package(url: "https://github.com/swift-man/OnTouchDownGesture.git", from: "0.6.0")

OnTouchDownGesture

SwiftUI Down Tapped

Badge Badge Badge - Version Badge - Swift Package Manager Badge - Platform Badge - Platform Badge - Platform Badge - License

Example 1

struct DownTapGestureExample: View {
  var body: some View {
    Circle()
      .frame(width: 100, height: 100, alignment: .center)
      .onTouchDownGesture { 
        // Event
      }
  }
}

Example 2

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
      }
  }
}

Installation

Swift Package Manager

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")
]

GitHub

link
Stars: 0
Last commit: 1 year ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

1 year ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics