Skip to content

v1.6.0 - Add gesture direction control functionality

Latest

Choose a tag to compare

@noppefoxwolf noppefoxwolf released this 02 Jul 09:38
· 2 commits to main since this release
35a06f9

🎉 New Features

  • Gesture Direction Control: Added ability to disable specific swipe directions (up, down, or all) in CardDeckView
  • New API: Introduced CardDeckScrollDirection option set for configuring disabled directions
  • View Modifier: Added .cardDeckDisabledScrollDirections() for easy configuration
  • Interactive Demo: Updated example app with live demo showing different gesture configurations

🛠️ What's Changed

  • Add CardDeckScrollDirection struct with .up, .down, .all options
  • Add environment-based configuration system for gesture control
  • Enhanced drag gesture handling with direction-specific filtering
  • Improved haptic feedback for enabled gestures only
  • Updated example app with picker interface for testing different configurations

🔧 API Usage

CardDeckView {
    // Your cards here
}
.cardDeckDisabledScrollDirections(.up) // Disable up swipes
.cardDeckDisabledScrollDirections(.down) // Disable down swipes  
.cardDeckDisabledScrollDirections(.all) // Disable all gestures

🧪 Testing

The example app now includes an interactive picker to test all gesture configurations:

  • Normal (all enabled)
  • Up swipe disabled
  • Down swipe disabled
  • All gestures disabled

✨ Backward Compatibility

Existing code continues to work without any changes - all gestures are enabled by default.

Full Changelog: v1.5.0...v1.6.0