velikanov / SwiftPasscodeLock

An iOS passcode lock with TouchID authentication written in Swift.
MIT License
199 stars 52 forks source link

Add cancel option to Enter state #33

Closed jrmsklar closed 8 years ago

jrmsklar commented 8 years ago

Our team would like the option to be able to cancel out of the .EnterPasscode state.

I thought of a couple different ways to do this:

  1. Set the default value for isCancellableAction on EnterPasswordState to true
  2. Make isCancellableAction on PasscodeLockStateType settable
  3. Add an associated value to LockState.EnterPasscode to allow for that state with or without a cancellable action.

While all options had their pros and cons, I felt that the most flexible way to do this was option (3). Keep in mind that this breaks backwards compatibility, so it may be a good idea to wait for the next major release to add this in, but of course, it's up to the owners of this repo.

jrmsklar commented 8 years ago

Used the wrong branch for this. Closing and re-opening.