Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ramotion/cardslider
:octocat: 🃏 Cardslider is a design UI controller that allows you to swipe through cards with pictures and accompanying descriptions.
https://github.com/ramotion/cardslider
ios swift
Last synced: 29 days ago
JSON representation
:octocat: 🃏 Cardslider is a design UI controller that allows you to swipe through cards with pictures and accompanying descriptions.
- Host: GitHub
- URL: https://github.com/ramotion/cardslider
- Owner: Ramotion
- License: mit
- Created: 2018-10-02T14:31:02.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-06T06:51:34.000Z (over 4 years ago)
- Last Synced: 2024-10-15T06:04:32.442Z (29 days ago)
- Topics: ios, swift
- Language: Swift
- Homepage: https://www.ramotion.com/iphone-app-development-ui-library-for-swiping-through-objects/
- Size: 21.8 MB
- Stars: 1,272
- Watchers: 35
- Forks: 102
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
CARD SLIDER
UI controller that allows you to swipe through cards with pictures.
___
We specialize in the designing and coding of custom UI for Mobile Apps and Websites.
Stay tuned for the latest updates:
#### Inspired by [Charles Patterson](https://dribbble.com/CharlesPatterson) [shot](https://dribbble.com/shots/3982621-InVision-Studio-Movies-app-concept)
[![Twitter](https://img.shields.io/badge/[email protected]?style=flat)](http://twitter.com/Ramotion)
[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://paypal.me/Ramotion)## Requirements
- iOS 11.0+
- Xcode 10.0+## Installation
Use [CocoaPods](https://cocoapods.org) with Podfile:
```
pod 'CardSlider'
```
or [Carthage](https://github.com/Carthage/Carthage) users can simply add CardSlider to their `Cartfile`:```
github "Ramotion/CardSlider"
```Then import the module in your code:
``` swift
import CardSlider
```## Usage
1) Declare a card model, implementing `CardSliderItem` protocol:
``` swift
public protocol CardSliderItem {
var image: UIImage { get }
var rating: Int? { get }
var title: String { get }
var subtitle: String? { get }
var description: String? { get }
}
```2) Implement `CardSliderDataSource` methods in your class:
``` swift
public protocol CardSliderDataSource: class {
func item(for index: Int) -> CardSliderItem
func numberOfItems() -> Int
}
```3) Create an instance of `CardSliderViewController` with the data source:
``` swift
guard let dataSource = someObject as? CardSliderDataSource else { return }
let cardSlider = CardSliderViewController.with(dataSource: dataSource)
```4) Set the title and present:
``` swift
cardSlider.title = "Movies"
present(cardSlider, animated: true, completion: nil)
```## 📄 License
Card Slider is released under the MIT license.
See [LICENSE](./LICENSE) for details.This library is a part of a selection of our best UI open-source projects.
If you use the open-source library in your project, please make sure to credit and backlink to www.ramotion.com
## 📱 Get the Showroom App for iOS to give it a try
Try this UI component and more like this in our iOS app. Contact us if interested.