Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zattoo/TvOSPinKeyboard
PIN keyboard for tvOS
https://github.com/zattoo/TvOSPinKeyboard
Last synced: 9 days ago
JSON representation
PIN keyboard for tvOS
- Host: GitHub
- URL: https://github.com/zattoo/TvOSPinKeyboard
- Owner: zattoo
- License: mit
- Created: 2017-08-09T14:27:36.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-07-25T07:59:34.000Z (over 2 years ago)
- Last Synced: 2024-11-16T08:16:17.049Z (27 days ago)
- Language: Swift
- Homepage:
- Size: 2.08 MB
- Stars: 102
- Watchers: 14
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - TvOSPinKeyboard - PIN keyboard for tvOS. (Apple TV)
- awesome-ios-star - TvOSPinKeyboard - PIN keyboard for tvOS. (Apple TV)
- fucking-awesome-ios - TvOSPinKeyboard - PIN keyboard for tvOS. (Apple TV)
README
# TvOSPinKeyboard
PIN keyboard for tvOS
![](Preview.gif)
## Description
TvOSPinKeyboard is a view controller that allows easily asking for PIN codes in tvOS.
## Requirements
- tvOS 9.0+
- Xcode 11## Installation
### Cocoapods
To integrate TvOSPinKeyboard into your Xcode project using CocoaPods, specify it in your `Podfile`:
```ruby
source 'https://github.com/CocoaPods/Specs.git'
platform :tvos, '9.0'
use_frameworks!target '' do
pod 'TvOSPinKeyboard', '~> 2.0.2'
end
```## Usage
All you need is to create an instance of TvOSPinViewController and to present it on the screen. Pin code will be sent back through TvOSPinKeyboardDelegate
```swift
import UIKit
import TvOSPinKeyboardclass ViewController: UIViewController, TvOSPinKeyboardViewDelegate {
@IBOutlet private weak var pinLabel: UILabel!
@IBAction func pinButtonWasPressed(_ sender: Any) {
let pinKeyboard = TvOSPinKeyboardViewController(withTitle: "Introduce your PIN", message: "A pin code is required")
pinKeyboard.delegate = selfpresent(pinKeyboard, animated: true, completion: nil)
}// MARK: - TvOSPinKeyboardViewDelegate
func pinKeyboardDidEndEditing(pinCode: String) {
pinLabel.text = "Your Pin Code is: " + pinCode
}
}
```## Customization
Apart from the title, subtitle, TvOSPinKeyboard offers a wide level of customization
Customizable properties:
- backgroundView
- pinLength
- titleFont
- titleColor
- subtitleFont
- subtitleColor
- pinFont
- pinColor
- pinBackgroundColor
- numpadButtons
- numpadFont
- deleteButtonTitle
- deleteButtonFont
- buttonsNormalTitleColor
- buttonsFocusedTitleColor
- buttonsFocusedBackgroundColor
- buttonsFocusedBackgroundEndColor
- buttonsNormalBackgroundColor
- buttonsNormalBackgroundEndColor