Git Product home page Git Product logo

ticketkit's Introduction

TicketKit

TicketKit is a framework that can use as a Ticket, Coupon or any way you like

github-small

import TicketKit

ticketView.enrollContentImage.image = UIImage(named: "qr")
ticketView.showEnrollImage()

github-small

import TicketKit

ticketView.enrollContentImage.image = UIImage(named: "soldout")
ticketView.showEnrollImage()

github-small

import TicketKit

ticketView.showPurchaseButton() // Default

github-small

import TicketKit

ticketView.hideDetailView()

Requirements

Swift 4.2 & 5.0. Ready for use on iOS 11.3+

Installation

To integrate TicketKit into your Xcode project using CocoaPods, specify it in your Podfile:

platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
pod 'TicketKit', :git => 'https://github.com/tiskender2/TicketKit.git'
end

Then, run the following terminal command:

pod install

Manual

Drag TicketKit.swift from the source folder into your Xcode project.

Usage

import TicketKit
@IBOutlet weak var ticketView: TicketKit!

ticketView.contentImage.image = UIImage(named: "joker")
ticketView.contentTitle.text = "Joker"
ticketView.duration.text = "2hr 2min"
ticketView.genre.text = "Drama,Action"
ticketView.rating.text = "8.5"
ticketView.price.text = "$30"
ticketView.subTitle.text = "StoryLine"
ticketView.desc.text = "desc"

ticketView.durationTitle.text = "DURATION"
ticketView.genreTitle.text = "GENRE"

// to change background Color
ticketView.topView.backgroundColor = .blue
ticketView.bottomView.backgroundColor = .blue

If you want to clipped view add below code in override func draw(_ rect: CGRect) or override func viewDidAppear(_ animated: Bool)

ticketView.addClips(to: .topView, corner: [.bottom,.top]) // default no clip
ticketView.setupDashedLine(fillColor: UIColor.blue.cgColor) // to change dashed line color, default is white

Apps using this framework

If you're using this control, I'd love hearing from you! and don't forget to put star ★

Credits

TicketKit was originally created by Tolga İskender

License

TicketKit is available under the MIT license. See the LICENSE file for more info.

ticketkit's People

Contributors

tiskender2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.