1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-14 23:33:34 +00:00

Remove UserDialogs plugin and dependencies for extension. Use custom/native dialogs for extension. Added modern http client to resolve TLS issues in extension. Dismiss and reload table for add site in extension.

This commit is contained in:
Kyle Spearrin
2016-07-09 15:23:54 -04:00
parent d61d3c201a
commit 4cb9488ee7
7 changed files with 75 additions and 46 deletions

View File

@@ -0,0 +1,32 @@
using System;
using System.Drawing;
using CoreGraphics;
using UIKit;
namespace Bit.iOS.Core.Utilities
{
public static class Dialogs
{
public static UIAlertController CreateLoadingAlert(string message)
{
var loadingIndicator = new UIActivityIndicatorView(new CGRect(10, 5, 50, 50));
loadingIndicator.HidesWhenStopped = true;
loadingIndicator.ActivityIndicatorViewStyle = UIActivityIndicatorViewStyle.Gray;
loadingIndicator.StartAnimating();
var alert = UIAlertController.Create(null, message, UIAlertControllerStyle.Alert);
alert.View.TintColor = UIColor.Black;
alert.View.Add(loadingIndicator);
return alert;
}
public static UIAlertController CreateAlert(string title, string message, string accept)
{
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));
return alert;
}
}
}