Git Product home page Git Product logo

numpad's Introduction

NumPad

Language Version CI Status codebeat badge Carthage compatible

Number Pad inspired by Square. This module is based on LEAmountInputView.

Demo

$ pod try NumPad

Requirements

  • iOS 9.0+
  • Xcode 9.0+
  • Swift 4 (NumPad 3.x), Swift 3 (NumPad 2.x), Swift 2.3 (NumPad 1.x)

Installation

CocoaPods

To install with CocoaPods, simply add this in your Podfile:

use_frameworks!
pod "NumPad"

Carthage

To install with Carthage, simply add this in your Cartfile:

github "efremidze/NumPad"

Manually

  1. Download and drop NumPad.swift in your project.
  2. Congratulations!

Usage

Add NumPad to your view.

import NumPad

let numPad = NumPad(frame: CGRect(x: 0, y: 0, width: 320, height: 600))
numPad.dataSource = self
numPad.delegate = self
addSubview(numPad)

Use the DefaultNumPad for a preconfigured dataSource and delegate.

Data Source

// number of rows
func numberOfRowsInNumPad(numPad: NumPad) -> Int

// number of columns for row
func numPad(numPad: NumPad, numberOfColumnsInRow row: Row) -> Int

// item for position
func numPad(numPad: NumPad, itemAtPosition position: Position) -> Item

Delegate

// handle item tap
func numPad(numPad: NumPad, itemTapped item: Item, atPosition position: Position)

// item size for position
func numPad(numPad: NumPad, sizeForItemAtPosition position: Position) -> CGSize

Contributions

Contributions are totally welcome.

License

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

numpad's People

Contributors

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

numpad's Issues

Incorrect supported platforms

Hey there,

I appreciate your work, it's really cool, but the requirements you stated are wrong.
Bot macOS and watchOS is impossible to support with the current state, yet you labelled both as requirements.

The whole project is based on iOS elements, so in order to support OSX, you need to rewrite it from the ground.

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.