Skip to content

v1.0.0

Latest

Choose a tag to compare

@melle melle released this 10 Oct 21:59

πŸŽ‰ OneFingerRotationGesture v1.0.0

A modern Swift 6.2 package for one-finger rotation gestures with native SwiftUI support.

✨ What's New

This is a complete modernization of the gesture recognizer from Objective-C to Swift 6.2:

  • Native SwiftUI Integration - Simple .oneFingerRotation() view modifier
  • Swift 6.2 with strict concurrency checking and @MainActor safety
  • iOS 17+ / macOS 14+ support
  • Closure-based callbacks instead of delegates
  • Performance optimized for smooth, responsive rotation tracking
  • Comprehensive documentation with examples and best practices

πŸš€ Quick Start

import SwiftUI
import OneFingerRotationGesture

struct ContentView: View {
    @State private var rotation: CGFloat = 0
    
    var body: some View {
        Image(systemName: "dial.fill")
            .resizable()
            .frame(width: 200, height: 200)
            .rotationEffect(.degrees(Double(rotation)))
            .animation(nil, value: rotation)
            .oneFingerRotation { angle in
                rotation += angle
            }
    }
}

πŸ“¦ Installation

Add to your project via Swift Package Manager:

.package(url: "https://github.com/melle/OneFingerRotationGesture", from: "1.0.0")

πŸ“± Demo App

Run the included demo app (DemoApp/DemoApp.xcodeproj) to see it in action with:

  • Visual touch area indicators
  • Real-time angle tracking
  • Smooth rotation performance

πŸ“– Documentation

  • README.md - Installation and usage guide
  • EXAMPLES.md - Real-world examples (volume controls, color pickers, timers, etc.)

πŸ”„ Migration from Objective-C

Looking for the original Objective-C implementation? It's preserved in the objc branch.

πŸ™ Credits

Based on my original concept from (2012).