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

Changed passcodeConfiguration from private to public #62

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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