Skip to content

Conversation

@timroejr
Copy link

Changed Variable Implementation from private to public. This allows developers to check to see if a passcode is present to determine if they want to show a specific view or not. I personally used this in a method that follows below

PasscodeLockViewController *vc = [lock getViewController];
    if ([lock hasPasscode]) {
        [self presentViewController:vc animated:TRUE completion:^{
            //We'll be showing something
        }];
    } else {
        //Nothing to Show
    }

This is a special case I have where running something like
passcodeLockPresent!.presentPasscodeLock() can't be used. In this case above I was calling on:

func getViewController() -> PasscodeLockViewController {
        let lock: PasscodeLockViewController = PasscodeLockViewController(state: .EnterPasscode, configuration: PasscodeLockConfiguration())
        return lock
    }

This Commit/PR would make it easier on the developer to determine if the user has a passcode such as in the case above.

For those wonder, '[lock hasPasscode];' with the modifications I made looks like this:

func hasPasscode() -> Bool {
        return passcodeLockPresenter!.passcodeConfiguration.repository.hasPasscode
    }

Thanks for taking a look at this PR! Please let me know if you need me to explain anything!

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

Successfully merging this pull request may close these issues.

1 participant