From f21be5ce41d9660b8f3837a3d12daf81ff55bbad Mon Sep 17 00:00:00 2001 From: Craig Dunn Date: Sat, 5 Sep 2015 12:54:29 -0700 Subject: [PATCH] [safari] removed unused package --- SafariViewController/csharp/SafariViewDemo.csproj | 4 ---- SafariViewController/csharp/ViewController.cs | 7 +++++-- SafariViewController/csharp/packages.config | 4 ---- .../fsharp/SafariViewDemoFS.fsproj | 4 ---- SafariViewController/fsharp/ViewController.fs | 14 ++++++++------ SafariViewController/fsharp/packages.config | 4 ---- 6 files changed, 13 insertions(+), 24 deletions(-) delete mode 100644 SafariViewController/csharp/packages.config delete mode 100644 SafariViewController/fsharp/packages.config diff --git a/SafariViewController/csharp/SafariViewDemo.csproj b/SafariViewController/csharp/SafariViewDemo.csproj index a882c54..9d87c07 100644 --- a/SafariViewController/csharp/SafariViewDemo.csproj +++ b/SafariViewController/csharp/SafariViewDemo.csproj @@ -65,9 +65,6 @@ - - packages\Xamarin.TestCloud.Agent.0.13.0\lib\Xamarin.iOS10\Calabash.dll - @@ -79,7 +76,6 @@ - diff --git a/SafariViewController/csharp/ViewController.cs b/SafariViewController/csharp/ViewController.cs index 3d70a37..aeb78f9 100644 --- a/SafariViewController/csharp/ViewController.cs +++ b/SafariViewController/csharp/ViewController.cs @@ -19,21 +19,24 @@ public override void ViewDidLoad () openButton.TouchUpInside += (sender, e) => { var sfvc = new SFSafariViewController (new NSUrl("http://xamarin.com"),true); - PresentViewController(sfvc, true, null); }; } + // API suggests this is required - but the dismiss seems to work without it + // (ie. this isn't even getting called) [Foundation.Export ("safariViewControllerDidFinish:")] public void DidFinish (SFSafariViewController controller) { DismissViewController (true, null); } + + + public override void DidReceiveMemoryWarning () { base.DidReceiveMemoryWarning (); - // Release any cached data, images, etc that aren't in use. } } } diff --git a/SafariViewController/csharp/packages.config b/SafariViewController/csharp/packages.config deleted file mode 100644 index 7ba0afb..0000000 --- a/SafariViewController/csharp/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/SafariViewController/fsharp/SafariViewDemoFS.fsproj b/SafariViewController/fsharp/SafariViewDemoFS.fsproj index d74f4b2..7bef7e9 100644 --- a/SafariViewController/fsharp/SafariViewDemoFS.fsproj +++ b/SafariViewController/fsharp/SafariViewDemoFS.fsproj @@ -79,9 +79,6 @@ - - packages\Xamarin.TestCloud.Agent.0.13.0\lib\Xamarin.iOS10\Calabash.dll - @@ -92,7 +89,6 @@ - diff --git a/SafariViewController/fsharp/ViewController.fs b/SafariViewController/fsharp/ViewController.fs index b36e61e..b48f88d 100644 --- a/SafariViewController/fsharp/ViewController.fs +++ b/SafariViewController/fsharp/ViewController.fs @@ -14,6 +14,13 @@ type ViewController () as x = let sfvc = new SFSafariViewController (new NSUrl("http://xamarin.com"), true) x.PresentViewController (sfvc, true, null) + // still trying to figure this bit out... + [] + let DidFinish (controller: SFSafariViewController) = + x.DismissViewController (true, null) + + interface ISFSafariViewControllerDelegate + override x.DidReceiveMemoryWarning () = // Releases the view if it doesn't have a superview. base.DidReceiveMemoryWarning () @@ -34,9 +41,4 @@ type ViewController () as x = toInterfaceOrientation <> UIInterfaceOrientation.PortraitUpsideDown else true - -// interface ISFSafariViewControllerDelegate - -// [] -// DidFinish (SFSafariViewController: controller) = -// DismissViewController (true, null) \ No newline at end of file + \ No newline at end of file diff --git a/SafariViewController/fsharp/packages.config b/SafariViewController/fsharp/packages.config deleted file mode 100644 index 7ba0afb..0000000 --- a/SafariViewController/fsharp/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file