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?
已存档?
是复刻?
已锁定?
是镜像?
是私有?