Inspired animation from Tinder and Potluck with random undo feature!
Run in physical device for better animaton!!!!
CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like SwiftMultiSelect in your projects. You can install it with the following command:
$ gem install cocoapods
To integrate GradientSlider into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target 'TargetName' do
use_frameworks!
pod 'TinderSwipeView’
end
Then, run the following command:
$ pod install
Tinder Swipe can be added to storyboard or instantiated programmatically:
let swipeView = TinderSwipeView<UserModel>(frame: viewContainer.bounds, overlayGenerator: overlayGenerator)
viewContainer.addSubview(swipeView)
swipeView.showTinderCards(with: userModels)
internal func cardGoesRight()
internal func cardGoesLeft()
internal func rightClickAction()
internal func leftClickAction()
internal func makeUndoAction()
internal func rollBackCard()
internal func shakeAnimationCard(completion: @escaping (Bool) -> ())
Here is a list of callbacks you can listen to:
protocol TinderCardDelegate: NSObjectProtocol {
func dummyAnimationDone()
func currentCardStatus(card: Any, distance: CGFloat)
func cardGoesLeft(_ object: Any)
func cardGoesRight(_ object: Any)
func endOfCardsReached()
}
* Swift 5
* XCode 10
* iOS 8.0 (Min SDK)
Nicky Patson
Tinder Swipe View is available under the MIT license. See the LICENSE file for more info.