1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-26 21:23:46 +00:00

redid lock pin page with pin control.

This commit is contained in:
Kyle Spearrin
2016-06-06 18:48:52 -04:00
parent 2c19413275
commit 89e4189779
6 changed files with 96 additions and 104 deletions

View File

@@ -23,6 +23,7 @@ namespace Bit.iOS.Controls
{
SetBorder(view);
SetMaxLength(view);
UpdateKeyboard();
if(view.DisableAutocapitalize)
{
@@ -79,6 +80,10 @@ namespace Bit.iOS.Controls
{
SetBorder(view);
}
else if(e.PropertyName == Xamarin.Forms.InputView.KeyboardProperty.PropertyName)
{
UpdateKeyboard();
}
}
private void SetBorder(ExtendedEntry view)
@@ -112,5 +117,17 @@ namespace Bit.iOS.Controls
return newLength <= view.MaxLength;
};
}
private void UpdateKeyboard()
{
if(Element.Keyboard == Keyboard.Numeric)
{
Control.KeyboardType = UIKeyboardType.NumberPad;
}
else
{
Control.ApplyKeyboard(Element.Keyboard);
}
}
}
}