:octocat: 🃏 Cardslider is a design UI controller that allows you to swipe through cards with pictures and accompanying descriptions.
Use CocoaPods with Podfile:
pod 'CardSlider'
or Carthage users can simply add CardSlider to their Cartfile
:
github "Ramotion/CardSlider"
Then import the module in your code:
import CardSlider
CardSliderItem
protocol:public protocol CardSliderItem {
var image: UIImage { get }
var rating: Int? { get }
var title: String { get }
var subtitle: String? { get }
var description: String? { get }
}
CardSliderDataSource
methods in your class:public protocol CardSliderDataSource: class {
func item(for index: Int) -> CardSliderItem
func numberOfItems() -> Int
}
CardSliderViewController
with the data source:guard let dataSource = someObject as? CardSliderDataSource else { return }
let cardSlider = CardSliderViewController.with(dataSource: dataSource)
cardSlider.title = "Movies"
present(cardSlider, animated: true, completion: nil)
Card Slider is released under the MIT license.
See 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
Try this UI component and more like this in our iOS app. Contact us if interested.