1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-15 07:43:37 +00:00

clear value after invalid pin

This commit is contained in:
Kyle Spearrin
2016-07-20 23:51:31 -04:00
parent 1a9d58eecc
commit 98335c6acb
2 changed files with 20 additions and 12 deletions

View File

@@ -27,12 +27,12 @@ namespace Bit.iOS.Core.Utilities
return alert;
}
public static UIAlertController CreateAlert(string title, string message, string accept)
public static UIAlertController CreateAlert(string title, string message, string accept, Action<UIAlertAction> acceptHandle = null)
{
var alert = UIAlertController.Create(title, message, UIAlertControllerStyle.Alert);
var oldFrame = alert.View.Frame;
alert.View.Frame = new RectangleF((float)oldFrame.X, (float)oldFrame.Y, (float)oldFrame.Width, (float)oldFrame.Height - 20);
alert.AddAction(UIAlertAction.Create(accept, UIAlertActionStyle.Default, null));
alert.AddAction(UIAlertAction.Create(accept, UIAlertActionStyle.Default, acceptHandle));
return alert;
}
}