Coder Social home page Coder Social logo

digitalkeyboard's Introduction

DigitalKeyboard

CI Status Version Platform

DigitalKeyboard

A custom digital keyboard for idcard

👀 See also:

dititalkeyboard_display

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

CocoaPods 0.39.0+ is required to build IDCardKeyboard 3.0.0+.

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

Swift 2.2:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'IDCardKeyboard', '~> 1.0.8'
end

Swift 2.3:

    pod 'IDCardKeyboard', :git => 'https://github.com/CNKCQ/DigitalKeyboard.git', :branch => 'Swift2.3'

Swift 3.0:

    pod 'DigitalKeyboard'

Then, run the following command:

$ pod install

📖 Usage

import UIKit

class ViewController: UIViewController {
  
  override func viewDidLoad() {
      super.viewDidLoad()
      // Do any additional setup after loading the view, typically from a nib.
      view.backgroundColor = UIColor.orange
      let textField = UITextField(frame: CGRect(x: 100, y: 120, width: 200, height: 35))
      textField.borderStyle = .roundedRect
      view.addSubview(textField)
      let keyboard = DigitalKeyboard(view: view)
      keyboard.style = .Number
      keyboard.customDoneButton(title: "hello", titleColor: UIColor.blue, theme: UIColor.green)
      textField.inputView = keyboard
      textField.becomeFirstResponder()
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
      // Dispose of any resources that can be recreated.
  }
}

🔑 Basics Swift 2.2、Swift 3.0

digitalkeyboard's People

Contributors

cnkcq avatar kingcq avatar

Watchers

 avatar  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.