43

GitHub - Ramotion/cardslider: ? Cardslider is a design UI controller that allows...

 5 years ago
source link: https://github.com/Ramotion/cardslider
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

header iOS_Card_Slider.gif

Card Slider

Twitter Donate

About

This project is maintained by Ramotion, Inc.
We specialize in the designing and coding of custom UI for Mobile Apps and Websites.

Inspired by Charles Patterson shot

Looking for developers for your project?
This project is maintained by Ramotion, Inc. We specialize in the designing and coding of custom UI for Mobile Apps and Websites.

contact_our_team@2x.png

The iPhone mockup available here.

Requirements

  • iOS 11.0+
  • Xcode 10.0+

Installation

Use CocoaPods with Podfile:

pod 'CardSlider'

or Carthage users can simply add Mantle 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)

Licence

CardSlider is released under the MIT license. See LICENSE for details.

Get the Showroom App for iOS to give it a try

Try more UI components like this in our iOS app. Contact us if interested.

app_store@2x.png contact_our_team@2x.png

Follow us for the latest updates
68747470733a2f2f692e696d6775722e636f6d2f7a69537165536f2e706e672f


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK