Repository navigation
🎉 New Features
- Gesture Direction Control: Added ability to disable specific swipe directions (up, down, or all) in CardDeckView
- New API: Introduced
CardDeckScrollDirectionoption 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
CardDeckScrollDirectionstruct with.up,.down,.alloptions - 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