Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of passcodes longer than 4 digits #55

Closed
le4ker opened this issue Jun 6, 2016 · 8 comments
Closed

Support of passcodes longer than 4 digits #55

le4ker opened this issue Jun 6, 2016 · 8 comments

Comments

@le4ker
Copy link

le4ker commented Jun 6, 2016

Great repository, thanks for sharing! 👏

Do you have any plans for supporting passcodes longer than 4 digits? i.e. would be great.

If not, do you want to give me some pointers on how to do it?

Thanks!
:panos

@ziogaschr
Copy link
Contributor

Try to set PasscodeLockConfigurationType.passcodeLength = 6

Then you will have to copy both the .xib file and its ViewController.swift file and update it in order it can handle 6 placeholders.

I have made it for our App, but not in a generic way so as UI get's updated accordingly from passcodeLength.
When I find some time I might look into making a generic PR.

@le4ker
Copy link
Author

le4ker commented Jun 6, 2016

Great!

I will wait for your fix, since I prefer to use the component as a pod, instead of forking it 😄

Thanks!
:panos

@ziogaschr
Copy link
Contributor

There is no need to fork it.

You just have to create a subclass in your project and follow the docs about the xib file.

I am not planning to work on this early on, so if you need this soon enough then please give the above a try and I will be happy to give you any advices needed here.

Cheers,
Chris

@le4ker
Copy link
Author

le4ker commented Jun 6, 2016

Then that's great, I will give it a try myself.

Thanks for the pointers!

Thanks!
:panos

@le4ker
Copy link
Author

le4ker commented Jun 9, 2016

@ziogaschr I managed to get the 6 character pin to work, but the two new placeholders are not behaving like the existing 4, they always stay at the same state. Their Class and Module is set to the same classes at the first 4 placeholders.

By the way I didn't subclass any PasscodeLock class (I just edited the PasscodeLockView.xib and then set the passcodeLength of my configuration to 6), so probably this is my missing piece for completing it. Any pointers would be very appreciated! 😄

Thanks!
:panos

@le4ker
Copy link
Author

le4ker commented Jun 9, 2016

I had to set the their referencing outlets to the file's owner 😄

Thanks for the guidelines! 👍

@le4ker le4ker closed this as completed Jun 9, 2016
@ziogaschr
Copy link
Contributor

Great news. I am super happy that it worked :)

@le4ker
Copy link
Author

le4ker commented Jun 10, 2016

@ziogaschr by the way, how can I fix the non persisted failed passcode attempts? I read the source code but with my (very limited) swift knowledge I can't find a non-hackish way to fix that 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants