cardslider

:octocat: ? Cardslider is a design UI controller that allows you to swipe through cards with pictures and accompanying descriptions. - https://github.com/Ramotion/swift-ui-animation-components-and-libraries

  • Owner: Ramotion/cardslider
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart


Inspired by Charles Patterson shot

Twitter
Donate

Requirements

  • iOS 11.0+
  • Xcode 10.0+

Installation

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

Usage

  1. Declare a card model, implementing 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 }
}
  1. Implement CardSliderDataSource methods in your class:
public protocol CardSliderDataSource: class {
	func item(for index: Int) -> CardSliderItem
	func numberOfItems() -> Int
}
  1. Create an instance of CardSliderViewController with the data source:
guard let dataSource = someObject as? CardSliderDataSource else { return }
let cardSlider = CardSliderViewController.with(dataSource: dataSource)
  1. Set the title and present:
cardSlider.title = "Movies"
present(cardSlider, animated: true, completion: nil)

? License

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

? 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.

Main metrics

Overview
Name With OwnerRamotion/cardslider
Primary LanguageSwift
Program languageSwift (Language Count: 2)
Platform
License:MIT License
所有者活动
Created At2018-10-02 14:31:02
Pushed At2020-04-06 06:51:34
Last Commit At2020-04-06 09:51:33
Release Count2
Last Release Name0.1.0 (Posted on 2019-12-15 16:23:04)
First Release Name0.0.1 (Posted on 2018-10-31 09:51:55)
用户参与
Stargazers Count1.3k
Watchers Count34
Fork Count103
Commits Count44
Has Issues Enabled
Issues Count20
Issue Open Count13
Pull Requests Count2
Pull Requests Open Count1
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private