TOPasscodeViewController icon indicating copy to clipboard operation
TOPasscodeViewController copied to clipboard

Clear passcode to simplify controller re-use

Open adamrothman opened this issue 7 years ago • 0 comments

  • [x] I have read this issue template and provided all possible information.
  • [x] I'm using CocoaPods and have run pod update before filing this issue.

Hardware / Software

Which version of the library were you using? 0.0.2 Which version of iOS are you running? 11.3 (simulator) What model of iOS device were you testing on? iPad Pro 10.5 (simulator) If using CocoaPods, which version of CocoaPods are you on? 1.5.3

Feature request

I would like to avoid creating a new instance of TOPasscodeViewController every time I want to present one. Instead, I'd like to re-use an instance that's created and owned by the presenting controller.

I can accomplish this now, but the second time I present the passcode TOPasscodeViewController, it still has its dots filled in from the previous entry.

It seems like there are two ways to solve this:

  1. Automatically clear the entered passcode when passcodeViewController(_:isCorrectCode:) returns a success.
  2. Expose an additional method on TOPasscodeViewController – something like clearPasscode().

adamrothman avatar May 27 '18 22:05 adamrothman