Git Product home page Git Product logo

pincodetextfield's People

Contributors

aclima93 avatar benbahrenburg avatar brightsider avatar cgoldsby avatar tkach avatar ultimate-deej avatar viktor-by avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pincodetextfield's Issues

Cannot inherit from PinCodeTextField

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!

Text not displayed

Typed text not displayed, when added programmatically can I have an example of how it can be done.

cursor color not showing

this is nice control but there is a problem
how to change cursor color,in demo example cursor not showing
pls help me

Dynamic Width

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?

How do I check when a UITextField changes?

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) {
}

Add Support for returnKeyType

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!

Issues with keyplane, leaks, and snapshotting

Using Swift 4.2, iOS 12.0:

Sample code:

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)
    }

Errors are:

  1. When calling 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:

  1. Also when calling 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)

screen shot 2018-11-27 at 12 13 53 pm

  1. When going in the background:
[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.

Error in Xcode 9.3

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!

Update for Swift 4.0

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

Carthage build error

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?

textContentType = .oneTimeCode not displaying code from sms

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!!

Add Keyboard Type

Really great repo. I appreciate your work. Can you please keyboard type as well? (Numeric, Email etc)

Ipad Handling

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.

Use PinCodeTextField in Storyboard

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.

Toggle keyboard secureTextEntry.

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

iOS 11 keyboard suggestion problem

in iOS 11 can't type any character from first row of keyboard ( see attachment img )

it work if i hide suggestion list above keyboard in settings.

how hide suggestion list programmatically?

thank you
image-1

Option to add custom inputAccessoryView

`
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.

.

how to clear the text

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

IB Designables: Failed to render and update auto layout

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'

Next release

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.

Use of undeclared type 'PinCodeTextField'/'Delegate'

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?

Setting CharacterLimit not working from code

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.