tkach / pincodetextfield Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Want to create my class, based on your:
class MYPinCodeTextField: PinCodeTextField {
}
But got error
Cannot inherit from non-open class 'PinCodeTextField' outside of its defining module
As I understood, you need to declare as open class instead public
@IBDesignable public class PinCodeTextField: UIView
->
@IBDesignable open class PinCodeTextField: UIView
Thank you!
//Similar as this method for textfield
func textField(textField: UITextField, shouldChangeCharactersInRange range: NSRange, replacementString string: String) -> Bool {
}
Typed text not displayed, when added programmatically can I have an example of how it can be done.
As like as mPhin login
ex : * * * _ _ _
Can you please update this library for swift 4.2, Xcode 10 and iOS 12?
How do you assign first responder to the textField?
this is nice control but there is a problem
how to change cursor color,in demo example cursor not showing
pls help me
Is there a way to dynamically update the width?
Let's say I need to use 6 characters but the width for the View will be tighter. Can I dynamically update the input views so that it adjusts to the iPhone screen size?
Hi, would it be possible to add support for auto-capitalization type?
var autocapitalizationType: UITextAutocapitalizationType
Thanks!
Hi, thanks for this solution, it really helped me. But, i want see when characters in TextFiled changes. Maybe, there is something on the like
func textFieldDidChange(textField: UITextField) {
}
for my app I need all keyboards to be UIKeyboardAppearance.dark
Is there any way to make it?
If possible could you please add support for .returnKeyType
like instead of the return button the keyboard saying "return" allow it to say "done". This would be greatly appreciated. Thank you!
Using Swift 4.2, iOS 12.0:
In the UIViewController
holding the PinCodeTextField:
viewDidLoad() {
super.viewDidLoad()
pinCodeTextField.allowedCharacterSet = CharacterSet.decimalDigits
pinCodeTextField.keyboardType = UIKeyboardType.numberPad
pinCodeTextField.font = UIFont(name: "CustomFont", size: 20.0) ?? UIFont.systemFont(ofSize: 20)
pinCodeTextField.underlineColor = UIColor.customColor
pinCodeTextField.updatedUnderlineColor = UIColor.customColor
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
pinCodeTextField.text = ""
pinCodeTextField.becomeFirstResponder()
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
pinCodeTextField.resignFirstResponder()
}
In AppDelegate
:
func applicationWillResignActive(_ application: UIApplication) {
// Hide keyboard in background
window?.endEditing(true)
}
pinCodeField.becomeFirstResponder()
:Can't find keyplane that supports type 4 for keyboard iPhone-PortraitTruffle-NumberPad; using 20615_PortraitTruffle_iPhone-Simple-Pad_Default
Seems to be due to using UIKeyboardType.numberPad
, but I do need the number pad, and the funny thing is that the app does show the number pad properly and not the default pad:
pinCodeField.becomeFirstResponder()
, I get 6 leaks:Malloc 32 Bytes QuartzCore CA::AttrList::set(unsigned int, _CAValueType, void const*)
UIKeyboardPredictionView 688 Bytes UIKitCore +[UIKeyboardPredictionView sharedInstance]
Malloc 16 Bytes QuartzCore CA::Layer::setter(unsigned int, _CAValueType, void const*)
CALayer 32 Bytes QuartzCore +[CALayer allocWithZone:]
Malloc 288 Bytes QuartzCore -[CALayer init]
Malloc 16 Bytes QuartzCore CA::AttrList::Node::alloc_memory(_CAValueType)
[Snapshotting] Snapshotting a view (0x150810200, UIKeyboardImpl) that is not in a visible window requires afterScreenUpdates:YES.
It seems that calling endEditing
or resignFirstResponder
while the app goes in the background causes this issue.
Can you please update this library for swift 5 and Xcode 10.2?
Hello,
Is it possible add support code prompts from SMS? There is a standard feature for this:
textfield.textContentType = .oneTimeCode
I really love using this. I was wondering if we could add support for textContentType for PinCodeTextField that UITextField has. That would be awesome. Thanks!
I get this when I install pod.
Hello , When I add PinCodeTextField on view xcode gives me this error :
IB Designables: Failed to render and update auto layout status for ActivateViewController (BsR-nV-Gia): dlopen(PinCodeTextField.framework, 1): no suitable image found. Did find: PinCodeTextField.framework: required code signature missing for 'PinCodeTextField.framework'
and pincode is blank and shows only when app runs. I updated cocoapods and problem still exist!
Hi , I just install PinCodeTextfield , but xcode shows me these warnings :
'characters' is deprecated: Please use String or Substring directly
let inputTextCount = text?.characters.count ?? 0
Please update it for swift 4.0
Hey guys:
I've import the project with Carthage, and whoever I wanna build, I receive this error message:
I run :
carthage build PinCodeTextField --platform iOS
Task failed with exit code 65
did I miss anything?
I really love this textfield.
I was using the feature textContentType = .oneTimeCode but was not getting the code from sms.
I tried setting autocorrectionType = .yes to try and make the grey bar appear but I was not successful.
Any suggestion would help. Thank you!!
Really great repo. I appreciate your work. Can you please keyboard type as well? (Numeric, Email etc)
As title! Any instruction here?
When I launch the app on iPad device and I type The Numbers inside the PinCodeTextField I am unable to see while on iPhone it works just fine.
The error: Use of undeclared type 'PinCodeTextField' keeps being displayed when calling the delegate
I attempted to integrate PinCodeTextField in my project by following these steps with Carthage
https://github.com/Carthage/Carthage#if-youre-building-for-ios-tvos-or-watchos
I am using XCode 9.4.1. I have the framework built for PinCodeTextField, and linked to my project: I can see the framework listed in Frameworks, containing the PinCodeTextField.h
and PinCodeTextField-Swift.h
headers.
I can't find a way to create the field from the storyboard: the search in the Object Library does not list it. If I create a UIView instead and try to change its class in CustomClass, PinCodeTextField is not found/valid.
Is there any information I could provide to see what I'm missing to use it in my storyboard and in swift?
Thanks.
I am toggling secureTextEntry of PinTextFieldView on button action. But it doesn't reflect change immediately after button click. When I type something on keyboard then it changes the state. Please tell me how to do this at runtime
Add import PinCodeTextField
in example ViewController.Swift
`
let nextButtonItem = UIBarButtonItem(title: NSLocalizedString("NEXT",
comment: ""),
style: .done,
target: self,
action: #selector(pinCodeNextAction))
let toolbar = UIToolbar()
toolbar.items = [UIBarButtonItem(barButtonSystemItem: .flexibleSpace, target: nil, action: nil),
nextButtonItem]
toolbar.barStyle = .default
self.codeTextField.inputAccessoryView = toolbar`
The above code throws error saying Cannot assign to property: 'inputAccessoryView' is a get-only property.
Please resolve this.
.
Hi,
I need to clear the text for user to retry, thus
pincode.text = "" // or nil
_ = pincode.becomeFirstResponder()
But it does not work. It seems that clear text function is not supported?
Regards
Hi,
I noticed that the podspec of the library has its version as 0.2.0 but the version that shows up in cocoapods.org is 0.1.0.
I need a left text alignment, but can't do this (
IB Designables: Failed to render and update auto layout status for CollectionListVC (lI4-ue-gps): dlopen(PinCodeTextField.framework, 1): no suitable image found. Did find: PinCodeTextField.framework: required code signature missing for 'PinCodeTextField.framework'
Good morning.
As I can see the latest version 0.1.0 was released more than one year ago. Are you going to deploy the new version via CocoaPods? If so, please create a release with the latest changes from the master branch.
Thank you in advance.
It is not showing any delegate methods for Protocol in Objective-C Implementation.
I am getting this Ambiguous use of 'placeholderText'
when I try to set the placeholderText from code.
I was curious if there is a way to show blinking cursor for the PinCodeTextField especially when dealing with multiple textfields it would be nice to know which textfield is being focused. Thank you!
Not able to implement it in my Objective C Project. Please help.
I tried to import this to my objective C proj via Pod. I couldn't work without insert '@objc' to your code.
So, can you make it available for Objective C prj with Pod imported.
Thanks.
I'm new into iOS development. and not really familiar with pods installation/usage workflow
I've just successfully installed pincodetextfiled pod using terminal
but when I'm using it, it keeps returning me this error:
Use of undeclared type 'PinCodeTextField'/'Delegate'
I've tried to rebuild/clean few times. no changes
I'm sure it have been added to mu project, but in Frameworks directory Pods_projname.framework is red! is that a problem?
UPDATE:
when I'm trying ti build I'm getting this:
ld: warning: directory not found for option '-F/Users/benyamin/Library/Developer/Xcode/DerivedData/pillcii-bvhwqpvilunpwncbgbkedzrmkffk/Build/Products/Debug-iphonesimulator/PinCodeTextField'
ld: framework not found PinCodeTextField
is there any more steps for using this pod?
Please I have this code snippet and I don't know why it is not working:
let pincodeView = PinCodeTextField()
pincodeView.isSecureTextEntry = true
pincodeView.characterLimit = 4
$0.addSubview(pincodeView)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.