CMPressableButton
Pressing Animation Button for iOS and macOS.
? Getting Started
Requirements
- Xcode 11+
- SwiftUI
- iOS 14+
- macOS 10.15+
Installaion
Swift Package Manager(SPM)
File ➜ Swift Packages ➜ Add Package Dependancy..
?Usage
action
: Functions to execute
?Custom Modifiers
.accentColor()
: Accent color.cornerRadius()
: Corner Radius of the button.frame()
: Size of the button.enableHaptic()
: Enable haptic effect with insensity(.heavy
,.medium
,.light
,.rigid
,.soft
).disableHaptic()
: Disable haptic effect
Example
? Simple
Result
? Custom Modifiers
Result
✅ TODO
- [ ] support variable styles
FlatStyle
,PushButtonStyle
, etc - [x] add haptic feedback