1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-16 00:03:22 +00:00

added storyboard to extension

This commit is contained in:
Kyle Spearrin
2016-06-02 23:28:17 -04:00
parent 437b565f8e
commit 186bbddff6
6 changed files with 81 additions and 58 deletions

View File

@@ -48,9 +48,7 @@ namespace Bit.iOS.Extension
private const string UTTypeAppExtensionFillWebViewAction = "org.appextension.fill-webview-action";
private const string UTTypeAppExtensionFillBrowserAction = "org.appextension.fill-browser-action";
private UIImageView _splashImageView;
public ActionViewController() : base("ActionViewController", null)
public ActionViewController(IntPtr handle) : base(handle)
{
}
@@ -94,21 +92,9 @@ namespace Bit.iOS.Extension
Resolver.SetResolver(new UnityResolver(container));
}
public override void LoadView()
public override void ViewDidLoad()
{
View = new UIView(UIScreen.MainScreen.Bounds)
{
BackgroundColor = new UIColor(0.93f, 0.94f, 0.96f, 1.0f),
};
_splashImageView = new UIImageView(new UIImage("Icon.png"));
View.AddSubview(_splashImageView);
}
public override void ViewDidAppear(bool animated)
{
base.ViewDidAppear(animated);
base.ViewDidLoad();
if(!Resolver.IsSet)
{
@@ -137,26 +123,9 @@ namespace Bit.iOS.Extension
break;
}
}
var navBar = new UINavigationBar(new CGRect(0, 0, View.Frame.Size.Width, 44))
{
BackgroundColor = new UIColor(0.24f, 0.55f, 0.74f, 1.0f),
TintColor = UIColor.White
};
var button = new UIButton(new CGRect(x: 10.0, y: 50.0, width: View.Frame.Size.Width - 100, height: 30.0))
{
BackgroundColor = UIColor.Black,
TintColor = UIColor.White
};
button.SetTitle("Done", UIControlState.Normal);
button.TouchUpInside += Button_TouchUpInside;
_splashImageView.RemoveFromSuperview();
View.AddSubviews(navBar, button);
}
private void Button_TouchUpInside(object sender, EventArgs e)
partial void DoneClicked(NSObject sender)
{
NSDictionary itemData = null;
if(ProviderType == UTType.PropertyList)