PLCurrencyTextField provides simple and user friendly support for the amount in the currency.
To start using the component add it to your project using CocoaPods, Carthage or manually then to create
PLCurrencyTextField instance put
UITextField using Interface builder and change its class to
PLCurrencyTextField in Identity inspector or do it from code.
minimumFractionDigits- Configure the minimum fraction digits count that will be used by the internal number formatter.
maximumFractionDigits- Configure the maximum fraction digits count that will be used by the internal number formatter.
locale- Configure locale that will be used by the internal number formatter.
numberValue- Returns current number value.
Swift 2.2, iOS 8.0
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate PLCurrencyTextField into your Xcode project using CocoaPods, specify it in your
source 'https://github.com/CocoaPods/Specs.git' platform :ios, '9.0' use_frameworks! target '<Your Target Name>' do pod 'PLCurrencyTextField' end
Then, run the following command:
$ pod install
Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
You can install Carthage with Homebrew using the following command:
$ brew update $ brew install carthage
To integrate PLCurrencyTextField into your Xcode project using Carthage, specify it in your
carthage update to build the framework and drag the built
PLCurrencyTextField.framework into your Xcode project.
You can download the latest files from our Releases page. After doing so, drag
PLCurrencyTextField.xcodeproj into your project in Xcode, and for your project target on General tab in Embedded Binaries section add
PLCurrencyTextField.framework. Example project is configured the same way, so you have the crib sheet.
PLCurrencyTextField is under MIT license. See LICENSE for details.