LTHPasscodeViewController 3.0.0
3 min read
You can find it here, or you can just pod update.
When I created the library, I didn't think of making it a cocoapod and all the #define macros and the constants were intended to ease the init: go in the library, customize it once, never think about it again, but after I turned it into a cocoapod, I never thought about the fact that the file gets overridden with every update until recently, when someone pointed it out to me.
3.0.0 comes with a couple of major changes and a few minor ones:
- All the macros and constants were changed to public properties.
- Supports pushing, not just presenting as a modal.
- Supports saving the passcode and timers in a different place than the Keychain. (more details below)
- Better supports Storyboards and IB. Still not perfect, because I almost never use(d) them, but I hope it's a good start.
- Has a complete documentation!
- The labels have
numberOfLines = 0.
About the custom saving:
- (NSTimeInterval)timerDuration;
- (void)saveTimerDuration:(NSTimeInterval)duration;
- (NSTimeInterval)timerStartTime;
- (void)saveTimerStartTime;
- (BOOL)didPasscodeTimerEnd;
- (void)deletePasscode;
- (void)savePasscode:(NSString *)passcode;
- (NSString *)passcode;
// All of them fall back on the Keychain if they are not implemented, even if [LTHPasscodeViewController useKeychain:NO] was called, for flexibility over what and where you save.
// Do you only want to save the passcode in a different location and leave everything else in the Keychain? Call [LTHPasscodeViewController useKeychain:NO], but only implement -savePasscode:As usual, if you find any problems or any way I could improve the library, please let me know.
==Thanks to everyone for the help and for all the suggestions that found their way into this update!==