Make your input value more userfriendly with easy implementation.
Will be more generic day by day
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
platform :ios, '9.0'
use_frameworks!
target '<Your Target Name>' do
pod 'YWTopInputField', ~> "0.4"
end
Then, run the following command:
$ pod install
platform :ios, '9.0'
use_frameworks!
target '<Your Target Name>' do
pod 'YWTopInputField', ~> "1.0"
end
pod 'YWTopInputField', ~> "2.0"
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))
func didShowYWInputField()
func doneAction(resultStr: String,_withTag tag:Int)
func didCancel()
//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)
ADDED 'customize' property as builder object
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
self.alert!.customize.setKeyboardType(_type: .numberPad).validate()
self.alert!.showInput(_withTitle: "", _andMessage: "", _withContentString: textField.text!, _withTag: tagIdentity.textFieldTag.rawValue, completion: {
(finished) in
})
- 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.
- Creator Yoseph Wijaya Savianto (@yosephwijaya)
- nsnull0/YWTopInputField is licensed under MIT LICENSE