https://github.com/nickypatson/tinderswipeview
Swipe view inspired by tinder
https://github.com/nickypatson/tinderswipeview
animation ios potluck swift swipe tinder tinder-swipe
Last synced: 9 months ago
JSON representation
Swipe view inspired by tinder
- Host: GitHub
- URL: https://github.com/nickypatson/tinderswipeview
- Owner: nickypatson
- License: mit
- Created: 2017-11-16T10:22:55.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-06T21:16:05.000Z (about 7 years ago)
- Last Synced: 2025-10-23T12:57:15.084Z (9 months ago)
- Topics: animation, ios, potluck, swift, swipe, tinder, tinder-swipe
- Language: Swift
- Homepage:
- Size: 94.7 MB
- Stars: 333
- Watchers: 10
- Forks: 60
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tinder Swipe View 
Inspired animation from Tinder and Potluck with random undo feature!
Run in physical device for better animaton!!!!
## Preview
## Screenshot
## Installation with CocoaPods
[CocoaPods](http://cocoapods.org) is a dependency manager for Swift, which automates and simplifies the process of using 3rd-party libraries in your projects. You can install it with the following command:
```bash
$ gem install cocoapods
```
## Podfile
To integrate GradientSlider into your Xcode project using CocoaPods, specify it in your `Podfile`:
```ruby
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
target 'TargetName' do
use_frameworks!
pod 'TinderSwipeView’ , '~> 1.1.8'
end
```
Then, run the following command:
```bash
$ pod repo update
$ pod install
```
## Instantiation
Tinder Swipe been instantiated programmatically using :
```swift
let swipeView = TinderSwipeView(frame: viewContainer.bounds, contentView: contentView)
swipeView.showTinderCards(with: userModels)
```
Dynamically create tinder card either by programmatically or from nib for each index
```swift
public typealias ContentView = (_ index: Int, _ frame: CGRect, _ element:Element) -> (UIView)
```
## Animation
```swift
internal func didSelectCard()
internal func cardGoesRight()
internal func cardGoesLeft()
internal func rightClickAction()
internal func leftClickAction()
internal func makeUndoAction()
internal func shakeAnimationCard(completion: @escaping (Bool) -> ())
```
## Delegate Methods
Here is a list of callbacks you can listen to:
```swift
protocol TinderCardDelegate: NSObjectProtocol {
func dummyAnimationDone()
func didSelectCard(card: TinderCard)
func fallbackCard(model:Any)
func currentCardStatus(card: Any, distance: CGFloat)
func cardGoesLeft(_ object: Any)
func cardGoesRight(_ object: Any)
func endOfCardsReached()
}
```
## Requirements
```
* Swift 5
* XCode 10
* iOS 8.0 (Min SDK)
```
## Author
Nicky Patson
[HomePage](http://about.me/nickypatson)
## License
Tinder Swipe View is available under the MIT license. See the LICENSE file for more info.
## Credits
Emoji based on [TTGEmojiRate](https://github.com/zekunyan/TTGEmojiRate)