KenanAtmaca / KSliderCard

Basic, animatable iOS slider card πŸƒ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

KSliderCard


MIT Licance Release Swift Platform Twitter

Requirements

  • Xcode 9.0 +
  • iOS 11.0 or greater

Installation

CocoaPods

  1. Install CocoaPods
  2. Add this repo to your Podfile
platform :ios, '11.0'

target 'ProjectName' do
  use_frameworks!
  pod 'KSliderCard'
end
  1. Run pod install
  2. Open up the new .xcworkspace that CocoaPods generated
  3. Whenever you want to use the library: import KSliderCard

Manually

  1. Simply download the KSliderCard source files and import them into your project.

Usage

import UIKit
import KSliderCard

class ViewController: UIViewController {
    
    var sliderCard:KSliderCard!

    override func viewDidLoad() {
        super.viewDidLoad()
        showSliderCard()
    }
    
    func showSliderCard() {
        sliderCard = KSliderCard(items: [KSliderCardItem(image: UIImage(named: "img1"), title: "Hello πŸŽ‰", text: "..."),
                                         KSliderCardItem(image: UIImage(named: "img2"), title: "Hii", text: "..."),
                                         KSliderCardItem(image: UIImage(named: "img3"), title: "Heey", text: "...")])
        sliderCard.options.isBlurImage = false
        sliderCard.options.backgroundStyle = .dark
        sliderCard.options.backAction = true
        sliderCard.options.backButtonImage = UIImage(named: "back")
        sliderCard.options.backButtonSize = CGSize(width: 64, height: 64)
        sliderCard.options.backButtonBackgroundColor = .clear
        sliderCard.options.backButtonColor = .white
        sliderCard.show(to: self.view)
    }
}

Options

titleColor:UIColor?
titleFont:UIFont?
textColor:UIColor?
textFont:UIFont?
isBlurImage:Bool = true
isAnimation:Bool = true
backgroundStyle:KSliderBackgroundStyle? // .dark, .light
blurStyle:KSliderBackgroundStyle? // .dark, .light
backAction:Bool = false
backButtonTitle:String?
backButtonImage:UIImage?
backButtonBackgroundColor:UIColor?
backButtonColor:UIColor?
backButtonTextColor:UIColor?
backButtonFont:UIFont?
backButtonSize:CGSize?

License

Usage is provided under the MIT License. See LICENSE for the full details.

About

Basic, animatable iOS slider card πŸƒ

License:MIT License


Languages

Language:Swift 93.2%Language:Ruby 4.1%Language:Objective-C 2.7%