Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public partial class LoginViewController : UIViewController
{
private ILoginPresenter _loginPresenter = null;
private IAsyncSubscriber _listenerToken = null;
public override void ViewDidLoad()
{
base.ViewDidLoad();
// Load presenter
_loginPresenter = DependencyService.Instance.LoadService<ILoginPresenter>();
_listenerToken = _loginPresenter.StartListening(
() =>
{
// Show loading state
SetProgressVisible(true);
},
() =>
{
// Show delay in loading, network delay
ShowDelayedLabel(true);
},
() =>
{
// Clear fields
ClearField(_userName);
ClearField(_password);
},
async () =>
{
// Finger print requested
await TransitionToFingerprintScreen();
},
async () =>
{
// Show quick passcode
await TransitionToPasscode();
},
async () =>
{
// Show login
await ShowLoginView();
}
}
private void ClearServices()
{
// Clear out any references
_listenerToken.StopListening();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.