Git Product home page Git Product logo

rfcalculatorkeyboard's Introduction

RFCalculatorKeyboard

Carthage compatible Build Status GitHub release

RFCalculatorKeyboard Screenshot

Usage

To run the example project, clone the repo, and open the 'Example/Example.xcodeproj' file.

Requirements

This component is written using Swift and Dynamic Frameworks, so iOS 8.x is required. However you may want to manually import the source files into your project, if you need to support 7.x.

Installation

RFCalculatorKeyboard is available through Carthage. To install it, simply add the following line to your Cartfile:

github "sprint84/RFCalculatorKeyboard" ~> 1.0

###Installing Carthage

To install the carthage tool on your system, please download and run the Carthage.pkg file for the latest release, then follow the on-screen instructions.

Alternately, you can use Homebrew and install the carthage tool on your system simply by running brew update and brew install carthage.

For further details, please visit the Carthage Github page

##Usage

Using RFCalculatorKeyboard is quite simple. First you need to import the Framework

import RFCalculatorKeyboard

Then instantiate the view and apply it to a text input (UITextField or UITextView).

let calcInputView = RFCalculatorKeyboard(frame: frame)
calcInputView.delegate = self
textField.inputView = calcInputView

RFCalculatorKeyboard uses a delegate to report back the values. That way, you have the flexibility to format the text the way you want before displaying to the user.

func calculator(calculator: RFCalculatorKeyboard, didChangeValue value: String) {
	valueTextField.text = value
}

Customization

RFCalculatorKeyboard supports some layout customizations.

// Show/Hide decimal button in keyboard. When hidden, the decimal input begin from the least
// significative cent. Eg. 0.00 -> 0.02 -> 0.25 -> 2.50
showDecimal: Bool 

numbersBackgroundColor: UIColor
numbersTextColor: UIColor
operationsBackgroundColor: UIColor
operationsTextColor: UIColor
equalBackgroundColor: UIColor
equalTextColor: UIColor

Author

Reefactor, Inc., [email protected]

License

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

rfcalculatorkeyboard's People

Contributors

sprint84 avatar

Stargazers

MohsinAli avatar

Watchers

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