https://github.com/nsnull0/ywtopinputfield
YWTopInputField is LightWeight generic input type
https://github.com/nsnull0/ywtopinputfield
cocoapods generic ios-lib ios-swift swift3 swift4 uikit
Last synced: 9 months ago
JSON representation
YWTopInputField is LightWeight generic input type
- Host: GitHub
- URL: https://github.com/nsnull0/ywtopinputfield
- Owner: nsnull0
- License: mit
- Archived: true
- Created: 2017-06-22T03:16:10.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-07T15:19:12.000Z (over 8 years ago)
- Last Synced: 2024-09-30T16:50:04.006Z (over 1 year ago)
- Topics: cocoapods, generic, ios-lib, ios-swift, swift3, swift4, uikit
- Language: Swift
- Homepage:
- Size: 1.05 MB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YWTopInputField
[](https://cocoapods.org/pods/YWTopInputField)
[](https://cocoapods.org/pods/YWTopInputField)
[](https://cocoapods.org/pods/YWTopInputField)
Make your input value more userfriendly with easy implementation.
Will be more generic day by day
## Availability
#### ⚠️ **This Library only Available to Swift > 3.0** ⚠️
## DEMO V0.4.0

## Installation
### CocoaPods
[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:
```bash
$ gem install cocoapods
```
```ruby
platform :ios, '9.0'
use_frameworks!
target '' do
pod 'YWTopInputField', ~> "0.4"
end
```
Then, run the following command:
```bash
$ pod install
```
## Swift 4.0 Compatibility for more stable version
```ruby
platform :ios, '9.0'
use_frameworks!
target '' do
pod 'YWTopInputField', ~> "1.0"
end
```
## Latest Version
```ruby
pod 'YWTopInputField', ~> "2.0"
```
## Initialization
```swift
var alert:YWTopInputFieldController?
self.alert = YWTopInputFieldController(_contentController: self, _andDelegate: self)
//Optional, it will setup to Default setting
alert!.setupInputField(_chooseAutoCorrectionType: .no, _chooseSpellCheckingType: .no, _chooseKeyboardType: .default, _chooseKeyboardAppearance: .alert)
//Optional, it will setup to Default setting
alert!.setupContainer(_chooseBlurStyleEffectContainer: .dark, _chooseTitleColor: .white, _chooseMessageColor: .white, _chooseFontTitle: .boldSystemFont(ofSize: 15.0), _chooseFontMessage: .systemFont(ofSize: 12.0))
```
## Delegation
```swift
func didShowYWInputField()
func doneAction(resultStr: String,_withTag tag:Int)
func didCancel()
```
## Property Setup
```swift
//Optional, it will setup to Default setting
alert!.setupInputField(_chooseAutoCorrectionType: .no, _chooseSpellCheckingType: .no, _chooseKeyboardType: .default, _chooseKeyboardAppearance: .alert)
//Optional, it will setup to Default setting
alert!.setupContainer(_chooseBlurStyleEffectContainer: .dark, _chooseTitleColor: .white, _chooseMessageColor: .white, _chooseFontTitle: .boldSystemFont(ofSize: 15.0), _chooseFontMessage: .systemFont(ofSize: 12.0))
//Optional, it will setup to Default setting <200>
alert!.setContainer(height: 250)
```
## Property Setup for Version > 2.0
ADDED 'customize' property as builder object
```swift
alert!.customize.setCorrectionType(_type: .no)
.setSpellCheckType(_type: .no)
.setKeyboardType(_type: .default)
.setKeyboardAppearance(_type: .alert)
.setBlurStyleEffectContainer(_type: .dark)
.setTitleColor(_color: .white)
.setMessageColor(_color: .white)
.setFontTitle(_font: .boldSystemFont(ofSize: 15.0))
.setMessageFont(_font: .systemFont(ofSize: 12.0))
.setHeightTextContainer(_height: 400)
.validate()
```
SNAPSHOT EXAMPLE
```swift
self.alert!.customize.setKeyboardType(_type: .numberPad).validate()
self.alert!.showInput(_withTitle: "", _andMessage: "", _withContentString: textField.text!, _withTag: tagIdentity.textFieldTag.rawValue, completion: {
(finished) in
})
```
## Support
- Updated occasionally for more Generic and developer-friendly
- Pull me request if you guys want to contribute too.
- More detail about usage can be seen at example workspace.
## Credits
- Creator Yoseph Wijaya Savianto ([@yosephwijaya](http://yoseph.ws))
## License
- nsnull0/YWTopInputField is licensed under MIT LICENSE