saoudrizwan/CardSlider

Swift
iOS

Tinder cards with a twist

iosswifttinder-uitindercards
스타 성장
스타
1.2k
포크
92
주간 성장
+0
이슈
1
5001k
2017년 2월2020년 4월2023년 6월2026년 9월
README

Card Slider for Swift

Tons of apps use a Tinder-style interface with cards that users can swipe right to 'like' or left to 'dislike'. But Yaroslav Zubko came up with an innovative and fresh approach to giving users more options besides just 'like' or 'dislike'. Here's Yaroslav's Dribbble shot that inspired me to create a 100% Swift project of this unique & new interface:

Dribbble shot

And here's a demo of the actual Swift project:

Demo

Note: you can pivot the cards in any direction, it all depends on where your finger is on the card.

Usage

This project isn't a framework, it's more so of a demonstration of how to approach this sort of user interface. Card Slider basically uses a UIPanGestureRecognizer in conjunction with several UIKit Dynamics behaviors. Because of this, ideally you would want all the card logic code in a view controller class, so I opted not make an external class that uses delegation to talk to the view controller.

CardView.swift

Most of the logic code is in the ViewController class, but each card is a subview of CardView. In the demo project, ImageCard is a subview of CardView and has its own custom subviews and layouts. You can create your own subclass of CardView and modify the cards data structure in ViewController to swap in your own custom cards. You can also modify the CardOption enum to show your own custom text on the cards for each of the 6 options (you may even add more, but that would require dealing with more emojis and laying them out properly.)

EmojiOptionsOverlay.swift

This file has all the logic code associated with showing the 6 emojis on the sides when the user pans the card around, as well as the heart emoji on the top right.

Credits

Yaroslav Zubko, the creator of the Dribbble shot that inspired this project, was kind enough to send me his design files. This concept and any artwork (including the emojis) is thanks to Yaroslav. https://dribbble.com/Yar_Z

관련 저장소
flutter/flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond

DartlibraryBSD 3-Clause "New" or "Revised" Licensemobileandroid
flutter.dev
178.9k31.1k
react/react-native

A framework for building native applications using React

C++MIT Licenseandroidapp-framework
reactnative.dev
126.5k25.2k
rustdesk/rustdesk

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

Rustcrates.ioappGNU Affero General Public License v3.0remote-controlremote-desktop
rustdesk.com
123k18.9k
justjavac/free-programming-books-zh_CN

:books: 免费的计算机编程类中文书籍,欢迎投稿

awesomeGNU General Public License v3.0pythonjavascript
weibo.com/justjavac
118.8k28.3k
Solido/awesome-flutter

An awesome list that curates the best Flutter libraries, tools, tutorials, articles and more.

Dartawesomeflutterawesome-list
61.1k6.9k
FiloSottile/mkcert

A simple zero-config tool to make locally trusted development certificates with any names you'd like.

GoGo ModulescliBSD 3-Clause "New" or "Revised" Licensehttpstls
mkcert.dev
59.6k3.1k
appwrite/appwrite

Appwrite® - complete cloud infrastructure for your web, mobile and AI apps. Including Auth, Databases, Storage, Functions, Messaging, Hosting, Realtime and more

TypeScriptnpmBSD 3-Clause "New" or "Revised" Licenseappwritedocker
appwrite.io
57.3k5.7k
google/material-design-icons

Material Design icons by Google (Material Symbols)

libraryApache License 2.0materialmaterial-design
google.github.io/material-design-icons/
53.9k9.7k
vsouza/awesome-ios

A curated list of awesome iOS ecosystem, including Objective-C and Swift Projects

SwiftawesomeMIT Licenseawesomeswift-library
awesomeios.dev
53.3k7k
ionic-team/ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.

TypeScriptnpmlibraryMIT Licenseionicmobile
ionicframework.com
52.7k13.3k
expo/expo

An open-source framework for making universal native apps with React. Expo runs on Android, iOS, and the web.

TypeScriptnpmlibraryMIT Licensemobileexpo
docs.expo.dev
52.1k13.9k
dkhamsing/open-source-ios-apps

:iphone: Collaborative List of Open-Source iOS Apps

awesomeCreative Commons Zero v1.0 Universaliosswift
52k6.1k