1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-23 11:45:38 +01:00

remove old action view controllers

This commit is contained in:
Kyle Spearrin 2019-06-28 10:45:42 -04:00
parent 7a230ee5f5
commit caa0af1258
6 changed files with 0 additions and 198 deletions

View File

@ -1,71 +0,0 @@
using System;
using MobileCoreServices;
using Foundation;
using UIKit;
namespace iOS.Autofill
{
public partial class ActionViewController : UIViewController
{
public ActionViewController(IntPtr handle) : base(handle)
{
}
public override void DidReceiveMemoryWarning()
{
// Releases the view if it doesn't have a superview.
base.DidReceiveMemoryWarning();
// Release any cached data, images, etc that aren't in use.
}
public override void ViewDidLoad()
{
base.ViewDidLoad();
// Get the item[s] we're handling from the extension context.
// For example, look for an image and place it into an image view.
// Replace this with something appropriate for the type[s] your extension supports.
bool imageFound = false;
foreach(var item in ExtensionContext.InputItems)
{
foreach(var itemProvider in item.Attachments)
{
if(itemProvider.HasItemConformingTo(UTType.Image))
{
// This is an image. We'll load it, then place it in our image view.
itemProvider.LoadItem(UTType.Image, null, delegate (NSObject image, NSError error)
{
if(image != null)
{
NSOperationQueue.MainQueue.AddOperation(delegate
{
imageView.Image = (UIImage)image;
});
}
});
imageFound = true;
break;
}
}
if(imageFound)
{
// We only handle one image, so stop looking for more.
break;
}
}
}
partial void DoneClicked(NSObject sender)
{
// Return any edited content to the host app.
// This template doesn't do anything, so we just echo the passed-in items.
ExtensionContext.CompleteRequest(ExtensionContext.InputItems, null);
}
}
}

View File

@ -1,24 +0,0 @@
//
// This file has been generated automatically to store outlets and
// actions made in the Xcode designer. If it is removed, they will be lost.
// Manual changes to this file may not be handled correctly.
//
using UIKit;
using Foundation;
namespace iOS.Autofill
{
[Register("ActionViewController")]
partial class ActionViewController
{
[Outlet]
UIImageView imageView { get; set; }
[Action("DoneClicked:")]
partial void DoneClicked(NSObject sender);
void ReleaseDesignerOutlets()
{
}
}
}

View File

@ -99,10 +99,6 @@
<None Include="Entitlements.plist" />
<Compile Include="Models\Context.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ActionViewController.designer.cs">
<DependentUpon>ActionViewController.cs</DependentUpon>
</Compile>
<Compile Include="ActionViewController.cs" />
<InterfaceDefinition Include="MainInterface.storyboard" />
<BundleResource Include="Resources\FontAwesome.ttf" />
<BundleResource Include="Resources\MaterialIcons_Regular.ttf" />

View File

@ -1,71 +0,0 @@
using System;
using MobileCoreServices;
using Foundation;
using UIKit;
namespace iOS.Extension
{
public partial class ActionViewController : UIViewController
{
public ActionViewController(IntPtr handle) : base(handle)
{
}
public override void DidReceiveMemoryWarning()
{
// Releases the view if it doesn't have a superview.
base.DidReceiveMemoryWarning();
// Release any cached data, images, etc that aren't in use.
}
public override void ViewDidLoad()
{
base.ViewDidLoad();
// Get the item[s] we're handling from the extension context.
// For example, look for an image and place it into an image view.
// Replace this with something appropriate for the type[s] your extension supports.
bool imageFound = false;
foreach(var item in ExtensionContext.InputItems)
{
foreach(var itemProvider in item.Attachments)
{
if(itemProvider.HasItemConformingTo(UTType.Image))
{
// This is an image. We'll load it, then place it in our image view.
itemProvider.LoadItem(UTType.Image, null, delegate (NSObject image, NSError error)
{
if(image != null)
{
NSOperationQueue.MainQueue.AddOperation(delegate
{
imageView.Image = (UIImage)image;
});
}
});
imageFound = true;
break;
}
}
if(imageFound)
{
// We only handle one image, so stop looking for more.
break;
}
}
}
partial void DoneClicked(NSObject sender)
{
// Return any edited content to the host app.
// This template doesn't do anything, so we just echo the passed-in items.
ExtensionContext.CompleteRequest(ExtensionContext.InputItems, null);
}
}
}

View File

@ -1,24 +0,0 @@
//
// This file has been generated automatically to store outlets and
// actions made in the Xcode designer. If it is removed, they will be lost.
// Manual changes to this file may not be handled correctly.
//
using UIKit;
using Foundation;
namespace iOS.Extension
{
[Register("ActionViewController")]
partial class ActionViewController
{
[Outlet]
UIImageView imageView { get; set; }
[Action("DoneClicked:")]
partial void DoneClicked(NSObject sender);
void ReleaseDesignerOutlets()
{
}
}
}

View File

@ -96,10 +96,6 @@
<DependentUpon>PasswordGeneratorViewController.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ActionViewController.designer.cs">
<DependentUpon>ActionViewController.cs</DependentUpon>
</Compile>
<Compile Include="ActionViewController.cs" />
<InterfaceDefinition Include="MainInterface.storyboard" />
<BundleResource Include="Resources\FontAwesome.ttf" />
<BundleResource Include="Resources\MaterialIcons_Regular.ttf" />