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

  • 所有者: Ramotion/cardslider
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖


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.

主要指標

概覽
名稱與所有者Ramotion/cardslider
主編程語言Swift
編程語言Swift (語言數: 2)
平台
許可證MIT License
所有者活动
創建於2018-10-02 14:31:02
推送於2020-04-06 06:51:34
最后一次提交2020-04-06 09:51:33
發布數2
最新版本名稱0.1.0 (發布於 2019-12-15 16:23:04)
第一版名稱0.0.1 (發布於 2018-10-31 09:51:55)
用户参与
星數1.3k
關注者數34
派生數103
提交數44
已啟用問題?
問題數20
打開的問題數13
拉請求數2
打開的拉請求數1
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?