1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-08 03:23:23 +00:00

ios extended entry options. next button actions for add site page

This commit is contained in:
Kyle Spearrin
2016-05-23 21:56:38 -04:00
parent 8e8272c6fd
commit 7ce1eec96d
6 changed files with 72 additions and 13 deletions

View File

@@ -23,6 +23,40 @@ namespace Bit.iOS.Controls
{
SetBorder(view);
SetMaxLength(view);
if(view.DisableAutocapitalize)
{
Control.AutocapitalizationType = UITextAutocapitalizationType.None;
}
if(view.Autocorrect.HasValue)
{
Control.AutocorrectionType = view.Autocorrect.Value ? UITextAutocorrectionType.Yes : UITextAutocorrectionType.No;
}
if(view.ReturnType.HasValue)
{
switch(view.ReturnType.Value)
{
case App.Enums.ReturnType.Return:
Control.ReturnKeyType = UIReturnKeyType.Default;
break;
case App.Enums.ReturnType.Done:
Control.ReturnKeyType = UIReturnKeyType.Done;
break;
case App.Enums.ReturnType.Go:
Control.ReturnKeyType = UIReturnKeyType.Go;
break;
case App.Enums.ReturnType.Next:
Control.ReturnKeyType = UIReturnKeyType.Next;
break;
case App.Enums.ReturnType.Search:
Control.ReturnKeyType = UIReturnKeyType.Search;
break;
default:
break;
}
}
}
}