NumPad
  • March 11, 2024

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

 

$ 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

GitHub


View Github

#apple #carthage #cocoapods #digits number #keyboard #numpad #pad #square #swift
YOU MIGHT ALSO LIKE...
CameraBackground

Features Both front and back camera supported. Flash modes: auto, on, off. Countdown timer. Tap to focus. Pinch to zoom. Usage  

DKCamera

Description A light weight & simple & easy camera for iOS by Swift. It uses CoreMotion framework to detect device orientation, so ...

HorizonSDK-iOS

Horizon SDK is a state of the art real-time video recording / photo shooting iOS library. Some of the features ...

LLSimpleCamera

LLSimpleCamera: A simple customizable camera - video recorder control LLSimpleCamera is a library for creating a customized camera - video ...

RSBarcodes_Swift

RSBarcodes allows you to read 1D and 2D barcodes using the metadata scanning capabilities introduced with iOS 7 and generate ...